blob: 7d61aa292982dabc74269a6d637b301b5c617d93 [file] [edit]
// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
template <class T> int f(T) {
struct MyClass {
static int staticField;
// expected-error@-1 {{static data member 'staticField' not allowed in local struct 'MyClass'}}
};
int MyClass::staticField = 42;
return 0;
}
int x = f(0);