blob: d1b70778d06286bae91e035537156f1dfec69e93 [file] [log] [blame]
// RUN: %clang_cc1 -fsyntax-only -verify %s
class Base {
virtual ~Base();
};
struct Foo : public Base {
const int kBlah = 3; // expected-error{{fields can only be initialized in constructors}}
Foo();
};
struct Bar : public Foo {
Bar() { }
};
struct Baz {
Foo f;
Baz() { }
};