Skip to content

Instantly share code, notes, and snippets.

@ajhager
Created August 2, 2010 19:20
Show Gist options
  • Save ajhager/505166 to your computer and use it in GitHub Desktop.
Save ajhager/505166 to your computer and use it in GitHub Desktop.
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