1 // Test equality constraints on associated types. Check we get type errors
6 fn boo(&self) -> <Self as Foo>::A;
13 fn boo(&self) -> usize {
18 fn foo1<I: Foo<A=Bar>>(x: I) {
22 fn foo2<I: Foo>(x: I) {
24 //~^ ERROR mismatched types
25 //~| found associated type `<I as Foo>::A`
26 //~| expected struct `Bar`, found associated type
27 //~| expected struct `Bar`
31 pub fn baz(x: &dyn Foo<A=Bar>) {
39 //~^ ERROR type mismatch resolving
40 //~| expected struct `Bar`, found `usize`
42 //~^ ERROR type mismatch resolving
43 //~| expected struct `Bar`, found `usize`