File tree 2 files changed +11
-2
lines changed
librustc/middle/typeck/check
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -431,10 +431,10 @@ impl<'self> LookupContext<'self> {
431
431
432
432
Candidate {
433
433
rcvr_match_condition : RcvrMatchesIfObject ( did) ,
434
- rcvr_substs : trait_ref . substs . clone ( ) ,
434
+ rcvr_substs : new_trait_ref . substs . clone ( ) ,
435
435
method_ty : m,
436
436
origin : method_object ( method_object {
437
- trait_id : trait_ref . def_id ,
437
+ trait_id : new_trait_ref . def_id ,
438
438
object_trait_id : did,
439
439
method_num : method_num,
440
440
real_index : vtable_index
Original file line number Diff line number Diff line change 10
10
11
11
trait Base : Base2 + Base3 {
12
12
fn foo ( & self ) -> ~str ;
13
+ fn foo1 ( & self ) -> ~str ;
14
+ fn foo2 ( & self ) -> ~str {
15
+ ~"base foo2"
16
+ }
13
17
}
14
18
15
19
trait Base2 : Base3 {
@@ -30,6 +34,9 @@ impl Base for X {
30
34
fn foo ( & self ) -> ~str {
31
35
~"base foo"
32
36
}
37
+ fn foo1 ( & self ) -> ~str {
38
+ ~"base foo1"
39
+ }
33
40
34
41
}
35
42
@@ -56,6 +63,8 @@ pub fn main() {
56
63
let s = & n as & Super ;
57
64
assert_eq ! ( s. bar( ) , ~"super bar");
58
65
assert_eq!(s.foo(),~" base foo");
66
+ assert_eq!(s.foo1(),~" base foo1");
67
+ assert_eq!(s.foo2(),~" base foo2");
59
68
assert_eq!(s.baz(),~" base2 baz");
60
69
assert_eq!(s.root(),~" base3 root" ) ;
61
70
}
You can’t perform that action at this time.
0 commit comments