Created
August 2, 2010 19:20
-
-
Save ajhager/505166 to your computer and use it in GitHub Desktop.
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 characters
Foo: cover from Int { | |
new: static func (i: Int) -> This { | |
i | |
} | |
println: func { | |
"%d" printfln(this) | |
} | |
} | |
Bar: cover from Foo { | |
new: static func (i: Int) -> This { | |
i | |
} | |
} | |
main: func { | |
f := Foo new(10) | |
f println() | |
b := Bar new(10) | |
// I'd like to be able to do the first one. | |
b println() // Doesn't work. | |
b as Foo println() // Works. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment