1// PR c++/31132 2 3template<typename T> class A 4{ 5 static int i; // { dg-error "is private" } 6 friend int T::foo(); // { dg-error "does not match" } 7}; 8 9struct B 10{ 11 void foo() { A<B>::i; } // { dg-error "within|candidate" } 12}; 13