2009-12-28 23:08:02 -05:00
|
|
|
Base: =>
|
2010-01-10 16:16:59 -05:00
|
|
|
Base::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
|
2010-01-10 16:16:59 -05:00
|
|
|
FirstChild::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
|
2010-01-10 16:16:59 -05:00
|
|
|
SecondChild::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
|
2010-01-10 16:16:59 -05:00
|
|
|
ThirdChild::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')
|
|
|
|
|
2010-01-08 10:54:44 -05:00
|
|
|
|
|
|
|
TopClass: arg =>
|
|
|
|
this.prop: 'top-' + arg
|
|
|
|
|
|
|
|
SuperClass: arg =>
|
|
|
|
super('super-' + arg)
|
|
|
|
|
|
|
|
SubClass: =>
|
|
|
|
super('sub')
|
|
|
|
|
|
|
|
SuperClass extends TopClass
|
|
|
|
SubClass extends SuperClass
|
|
|
|
|
|
|
|
print((new SubClass()).prop is 'top-super-sub')
|