[tests] Add passing test

Closes #3683
This commit is contained in:
Tim Chevalier 2012-11-24 14:01:57 -08:00
parent 77e5498868
commit fa66f3ec18

View File

@ -0,0 +1,16 @@
trait Foo {
fn a() -> int;
fn b() -> int {
self.a() + 2
}
}
impl int: Foo {
fn a() -> int {
3
}
}
fn main() {
assert(3.b() == 5);
}