Revisions
-
Amos Wenger revised this gist
Sep 5, 2011 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,21 @@ A: class <T> { foo: T init: func(=foo) { "A init" printfln(foo as Int) } } B: class extends A<Int> { init: func (.foo) { super(foo) "B init | foo = %d" printfln(foo) // just 'this foo' should work. Hmm. intFoo := this foo as Int "intFoo = %d" printfln(intFoo) } } main: func { B new(42 as Int) } -
ycros created this gist
Oct 4, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ A: class <T> { foo: T init: func(=foo) { } } B: class extends A<Int> { init: func(.foo) { super(foo) } }