got extends back in the language -- use it together with super

This commit is contained in:
Jeremy Ashkenas
2009-12-24 16:49:23 -08:00
parent 47812d9ea6
commit 1c83e68292
10 changed files with 62 additions and 38 deletions

View File

@@ -3,17 +3,17 @@ Base.prototype.func: string =>
'zero/' + string.
FirstChild: => .
FirstChild.prototype.__proto__: new Base()
FirstChild extends new Base()
FirstChild.prototype.func: string =>
super('one/') + string.
SecondChild: => .
SecondChild.prototype.__proto__: new FirstChild()
SecondChild extends new FirstChild()
SecondChild.prototype.func: string =>
super('two/') + string.
ThirdChild: => .
ThirdChild.prototype.__proto__: new SecondChild()
ThirdChild extends new SecondChild()
ThirdChild.prototype.func: string =>
super('three/') + string.