1 #![feature(associated_type_defaults)] 2 3 // This is a partial regression test for #26681, which used to fail to resolve 4 // `Self` in the assoc. constant, and now fails with a type mismatch because 5 // `Self::Fv` cannot be assumed to equal `u8` inside the trait. 6 7 trait Foo { 8 type Bar; 9 } 10 11 impl Foo for u8 { 12 type Bar = (); 13 } 14 15 trait Baz { 16 type Fv: Foo = u8; 17 const C: <Self::Fv as Foo>::Bar = 6665; //~ error: mismatched types 18 } 19 main()20fn main() {} 21