rust/src/test/compile-fail/issue-3702-2.rs

14 lines
302 B
Rust
Raw Normal View History

2012-12-06 20:32:13 -06:00
trait Add {
fn to_int(&self) -> int;
fn add_dynamic(&self, other: &Add) -> int;
}
impl int: Add {
fn to_int(&self) -> int { *self }
fn add_dynamic(&self, other: &Add) -> int {
self.to_int() + other.to_int() //~ ERROR multiple applicable methods in scope
}
}
fn main() { }