1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/test/fixtures/execution/test_calling_super.coffee

25 lines
493 B
CoffeeScript
Raw Normal View History

2009-12-28 23:08:02 -05:00
Base: =>
Base.prototype.func: string =>
2009-12-28 23:08:02 -05:00
'zero/' + string
2009-12-28 23:08:02 -05:00
FirstChild: =>
FirstChild extends Base
FirstChild.prototype.func: string =>
2009-12-28 23:08:02 -05:00
super('one/') + string
2009-12-28 23:08:02 -05:00
SecondChild: =>
SecondChild extends FirstChild
SecondChild.prototype.func: string =>
2009-12-28 23:08:02 -05:00
super('two/') + string
2009-12-28 23:08:02 -05:00
ThirdChild: =>
this.array: [1, 2, 3]
ThirdChild extends SecondChild
ThirdChild.prototype.func: string =>
2009-12-28 23:08:02 -05:00
super('three/') + string
result: (new ThirdChild()).func('four')
print(result is 'zero/one/two/three/four')