mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
parent
77e5498868
commit
fa66f3ec18
16
src/test/run-pass/issue-3683.rs
Normal file
16
src/test/run-pass/issue-3683.rs
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user