// { dg-do compile { target c++20 } } template struct S { using type = T::type; // { dg-bogus "" } }; template auto f() { return [] (U) { // Verify that partial instantiation of this generic lambda doesn't cause // these requirements to get checked out of order. static_assert(!requires { typename U::type; typename S::type; }); return 0; }; } int a = f()(0);