// PR c++/30299 struct A { int i; }; template struct B : A // { dg-error "not a valid type" } { B() { this->i; } };