2009-12-24 19:23:23 -05:00
|
|
|
Base: => .
|
|
|
|
Base.prototype.func: string =>
|
|
|
|
'zero/' + string.
|
|
|
|
|
|
|
|
FirstChild: => .
|
2009-12-25 16:57:47 -05:00
|
|
|
FirstChild extends Base
|
2009-12-24 19:23:23 -05:00
|
|
|
FirstChild.prototype.func: string =>
|
|
|
|
super('one/') + string.
|
|
|
|
|
|
|
|
SecondChild: => .
|
2009-12-25 16:57:47 -05:00
|
|
|
SecondChild extends FirstChild
|
2009-12-24 19:23:23 -05:00
|
|
|
SecondChild.prototype.func: string =>
|
|
|
|
super('two/') + string.
|
|
|
|
|
|
|
|
ThirdChild: => .
|
2009-12-25 16:57:47 -05:00
|
|
|
ThirdChild extends SecondChild
|
2009-12-24 19:23:23 -05:00
|
|
|
ThirdChild.prototype.func: string =>
|
|
|
|
super('three/') + string.
|
|
|
|
|
|
|
|
result: (new ThirdChild()).func('four')
|
|
|
|
|
|
|
|
print(result is 'zero/one/two/three/four')
|
|
|
|
|