1 // Test equality constraints in a where clause where the type being
2 // equated appears in a supertrait.
16 fn a<C:Vehicle+Box>(_: C::Color) {
17 //~^ ERROR ambiguous associated type `Color` in bounds of `C`
20 fn b<C>(_: C::Color) where C : Vehicle+Box {
21 //~^ ERROR ambiguous associated type `Color` in bounds of `C`
24 fn c<C>(_: C::Color) where C : Vehicle, C : Box {
25 //~^ ERROR ambiguous associated type `Color` in bounds of `C`
29 impl<X> D<X> where X : Vehicle {
30 fn d(&self, _: X::Color) where X : Box { }
31 //~^ ERROR ambiguous associated type `Color` in bounds of `X`
35 fn e(&self, _: X::Color) where X : Box;
36 //~^ ERROR ambiguous associated type `Color` in bounds of `X`
38 fn f(&self, _: X::Color) where X : Box { }
39 //~^ ERROR ambiguous associated type `Color` in bounds of `X`