auto merge of #9527 : bmaxa/rust/master, r=alexcrichton

that is, if super trait had more methods, tnen subtrait, compiling would fail. I simply forgot to update
variable name. Updated test case , too.
This commit is contained in:
bors 2013-09-27 01:36:15 -07:00
commit afbc242a20
2 changed files with 11 additions and 2 deletions

View file

@ -10,6 +10,10 @@
trait Base: Base2 + Base3{
fn foo(&self) -> ~str;
fn foo1(&self) -> ~str;
fn foo2(&self) -> ~str{
~"base foo2"
}
}
trait Base2: Base3{
@ -30,6 +34,9 @@ impl Base for X {
fn foo(&self) -> ~str{
~"base foo"
}
fn foo1(&self) -> ~str{
~"base foo1"
}
}
@ -56,6 +63,8 @@ pub fn main() {
let s = &n as &Super;
assert_eq!(s.bar(),~"super bar");
assert_eq!(s.foo(),~"base foo");
assert_eq!(s.foo1(),~"base foo1");
assert_eq!(s.foo2(),~"base foo2");
assert_eq!(s.baz(),~"base2 baz");
assert_eq!(s.root(),~"base3 root");
}