blob: a0a8c86d9495488d6b257e6ffe12d65a539fc6c3 [file] [log] [blame]
#![feature(associated_type_defaults)]
// This is a partial regression test for #26681, which used to fail to resolve
// `Self` in the assoc. constant, and now fails with a type mismatch because
// `Self::Fv` cannot be assumed to equal `u8` inside the trait.
trait Foo {
type Bar;
}
impl Foo for u8 {
type Bar = ();
}
trait Baz {
type Fv: Foo = u8;
const C: <Self::Fv as Foo>::Bar = 6665; //~ error: mismatched types
}
fn main() {}