1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 @interface SuperClass : Root
7 int iSuper; // expected-note {{previous declaration is here}}
11 @interface SubClass : SuperClass {
12 int ivar; // expected-error {{duplicate member 'ivar'}}
13 int another_ivar; // expected-error {{duplicate member 'another_ivar'}}
14 int iSuper; // expected-error {{duplicate member 'iSuper'}}
18 @interface SuperClass () {
19 int ivar; // expected-note {{previous declaration is here}}
24 int another_ivar; // expected-note {{previous declaration is here}}
28 @implementation SubClass
30 return self->ivar; // would be ambiguous if the duplicate ivar were allowed