blob: d1b70778d06286bae91e035537156f1dfec69e93 [file] [log] [blame]
Matt Beaumont-Gay3334b0b2011-03-28 01:39:13 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2class Base {
3 virtual ~Base();
4};
5struct Foo : public Base {
6 const int kBlah = 3; // expected-error{{fields can only be initialized in constructors}}
7 Foo();
8};
9struct Bar : public Foo {
10 Bar() { }
11};
12struct Baz {
13 Foo f;
14 Baz() { }
15};