It is not mad, but it runs:
Strict
Type t1
Field a
Method geta()
Return a
End Method
End Type
Type t2
Field b
Method getb()
Return b
End Method
End Type
Type comb
Global t1:t1 = New t1
Global t2:t2 = New t2
End Type
Local my:comb = New comb
my.t1.a = 10
my.t2.b = 20
Print "> "+ my.t1.geta()
Print "> "+ my.t2.getb()
Or, which I make:
Strict
Type t1
Field a
Method geta()
Return a
End Method
End Type
Type t2 Extends t1
Field b
Method getb()
Return b
End Method
End Type
Type t3 Extends t2
Field c
Method getc()
Return c
End Method
End Type
Local my:t3 = New t3
my.a = 10
my.b = 20
my.c = 30
Print "> "+ my.geta()
Print "> "+ my.getb()
Print "> "+ my.getc()
|