summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/typo-correction-arc.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/typo-correction-arc.m')
-rw-r--r--clang/test/SemaObjC/typo-correction-arc.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/typo-correction-arc.m b/clang/test/SemaObjC/typo-correction-arc.m
new file mode 100644
index 00000000000..9131ca86dc9
--- /dev/null
+++ b/clang/test/SemaObjC/typo-correction-arc.m
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -triple i386-apple-macosx10.10 -fobjc-arc -fsyntax-only -Wno-objc-root-class %s -verify
+
+typedef unsigned long NSUInteger;
+
+@interface NSArray
+- (instancetype)initWithObjects:(const id[])objects count:(NSUInteger)count;
+@end
+
+@interface I
+@property NSArray *array;
+@end
+
+@interface J
+- (void)setArray:(id)array;
+@end
+
+@implementation J {
+ I *i;
+}
+- (void)setArray:(id)array { // expected-note{{'array' declared here}}
+ i.array = aray; // expected-error{{use of undeclared identifier 'aray'; did you mean 'array'}}
+}
+@end
+
OpenPOWER on IntegriCloud