From fa66f3ec18a136addc71fd82300febdd6cf787e9 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Sat, 24 Nov 2012 14:01:57 -0800 Subject: [PATCH] [tests] Add passing test Closes #3683 --- src/test/run-pass/issue-3683.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/run-pass/issue-3683.rs diff --git a/src/test/run-pass/issue-3683.rs b/src/test/run-pass/issue-3683.rs new file mode 100644 index 0000000000000..bff9f054a93f9 --- /dev/null +++ b/src/test/run-pass/issue-3683.rs @@ -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); +}