template struct L { struct I {}; }; template void L::I::foo() {} // { dg-error "" }