// PR c++/115716 // { dg-do compile { target c++20 } } template struct x { template struct y { // { dg-note "original" } typedef T result2; }; }; template<> template requires true struct x::y { // { dg-error "different constraints" } typedef double result2; }; int main() { x::y::result2 xxx2; }