add test for alias self_ty

This commit is contained in:
Adwin White 2025-11-05 21:29:39 +08:00
parent e2ac9d92d9
commit d2cfc47ed0

View File

@ -16,4 +16,21 @@ where
x
}
trait Id<'a> {
type This: ?Sized;
}
impl<T: ?Sized> Id<'_> for T {
type This = T;
}
// Ensure that we properly normalize alias self_ty before evaluating the goal.
fn alias_foo<T>(x: for<'a> fn(
<<dyn Trait<Assoc = T> as Id<'a>>::This as Trait>::Assoc
)) -> fn(T)
where
dyn Trait<Assoc = T>: Trait,
{
x
}
fn main() {}