Skip to content

Commit

Permalink
[tests] Add passing test
Browse files Browse the repository at this point in the history
Closes #3683
  • Loading branch information
catamorphism committed Nov 24, 2012
1 parent 77e5498 commit fa66f3e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/run-pass/issue-3683.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit fa66f3e

Please sign in to comment.