Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Forked from ycros/dotvar.ooc
Created September 5, 2011 14:45
Show Gist options
  • Save nddrylliog/1195154 to your computer and use it in GitHub Desktop.
Save nddrylliog/1195154 to your computer and use it in GitHub Desktop.
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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment