blob: b4a9df282d44d07a8916837bff04b1bc679f3f62 [file] [log] [blame]
Fariborz Jahanian1147c5e2009-12-14 17:36:25 +00001// RUN: clang -cc1 -fsyntax-only -verify %s
Fariborz Jahanian3281eff2008-12-16 01:08:35 +00002
3@interface B1 {
4@public
Douglas Gregor72de6672009-01-08 20:45:30 +00005 double fill_B; // expected-note {{previous declaration is here}}
Daniel Dunbarad04e672009-05-03 01:08:28 +00006 unsigned : 0;
Fariborz Jahanian3281eff2008-12-16 01:08:35 +00007}
8@end
9
10@interface B : B1 {
11@public
Douglas Gregor72de6672009-01-08 20:45:30 +000012 int one; // expected-note {{previous declaration is here}}
Fariborz Jahanian3281eff2008-12-16 01:08:35 +000013 int one; // expected-error {{duplicate member 'one'}}
Daniel Dunbarad04e672009-05-03 01:08:28 +000014 unsigned : 0;
Fariborz Jahanian3281eff2008-12-16 01:08:35 +000015}
16@end
17
18@interface A : B {
19@public
20 int fill_B; // expected-error {{duplicate member 'fill_B'}}
21}
22@end