Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 %s -verify -fsyntax-only
      2 
      3 @protocol P
      4 -(id)description;
      5 @end
      6 
      7 @interface B<P>
      8 @property int x;
      9 @end
     10 
     11 @interface S : B {
     12   id _someivar; // expected-note {{here}}
     13 }
     14 @end
     15 
     16 // Spell-checking 'undefined' is ok.
     17 undefined var; // expected-error {{unknown type name}}
     18 
     19 typedef int super1;
     20 @implementation S
     21 -(void)foo:(id)p1 other:(id)p2 {
     22   // Spell-checking 'super' is not ok.
     23   super.x = 0;
     24   self.x = 0;
     25 }
     26 
     27 -(void)test {
     28   [self foo:[super description] other:someivar]; // expected-error {{use of undeclared identifier 'someivar'; did you mean '_someivar'?}}
     29 }
     30 @end
     31