diff options
Diffstat (limited to 'test/SemaObjC/typo-correction.m')
-rw-r--r-- | test/SemaObjC/typo-correction.m | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/SemaObjC/typo-correction.m b/test/SemaObjC/typo-correction.m index 893e31294ad6..58824e2edbf0 100644 --- a/test/SemaObjC/typo-correction.m +++ b/test/SemaObjC/typo-correction.m @@ -1,10 +1,16 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only -@interface B +@protocol P +-(id)description; +@end + +@interface B<P> @property int x; @end -@interface S : B +@interface S : B { + id _someivar; // expected-note {{here}} +} @end // Spell-checking 'undefined' is ok. @@ -12,9 +18,13 @@ undefined var; // expected-error {{unknown type name}} typedef int super1; @implementation S --(void)foo { +-(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 |