aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/typo-correction.m
blob: 58824e2edbf097dd97e9d0d06650f239725c3091 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: %clang_cc1 %s -verify -fsyntax-only

@protocol P
-(id)description;
@end

@interface B<P>
@property int x;
@end

@interface S : B {
  id _someivar; // expected-note {{here}}
}
@end

// Spell-checking 'undefined' is ok.
undefined var; // expected-error {{unknown type name}}

typedef int super1;
@implementation S
-(void)foo:(id)p1 other:(id)p2 {
  // Spell-checking 'super' is not ok.
  super.x = 0;
  self.x = 0;
}

-(void)test {
  [self foo:[super description] other:someivar]; // expected-error {{use of undeclared identifier 'someivar'; did you mean '_someivar'?}}
}
@end