2009-12-28 23:08:02 -05:00
|
|
|
Base: =>
|
2009-12-24 19:23:23 -05:00
|
|
|
Base.prototype.func: string =>
|
2009-12-28 23:08:02 -05:00
|
|
|
'zero/' + string
|
2009-12-24 19:23:23 -05:00
|
|
|
|
2009-12-28 23:08:02 -05:00
|
|
|
FirstChild: =>
|
2009-12-25 16:57:47 -05:00
|
|
|
FirstChild extends Base
|
2009-12-24 19:23:23 -05:00
|
|
|
FirstChild.prototype.func: string =>
|
2009-12-28 23:08:02 -05:00
|
|
|
super('one/') + string
|
2010-01-06 23:34:56 -05:00
|
|
|
|
2009-12-28 23:08:02 -05:00
|
|
|
SecondChild: =>
|
2009-12-25 16:57:47 -05:00
|
|
|
SecondChild extends FirstChild
|
2009-12-24 19:23:23 -05:00
|
|
|
SecondChild.prototype.func: string =>
|
2009-12-28 23:08:02 -05:00
|
|
|
super('two/') + string
|
2010-01-06 23:34:56 -05:00
|
|
|
|
2009-12-28 23:08:02 -05:00
|
|
|
ThirdChild: =>
|
2010-01-06 23:34:56 -05:00
|
|
|
this.array: [1, 2, 3]
|
2009-12-25 16:57:47 -05:00
|
|
|
ThirdChild extends SecondChild
|
2009-12-24 19:23:23 -05:00
|
|
|
ThirdChild.prototype.func: string =>
|
2009-12-28 23:08:02 -05:00
|
|
|
super('three/') + string
|
2009-12-24 19:23:23 -05:00
|
|
|
|
|
|
|
result: (new ThirdChild()).func('four')
|
|
|
|
|
|
|
|
print(result is 'zero/one/two/three/four')
|
|
|
|
|