summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/alias-test-2.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/alias-test-2.m')
-rw-r--r--clang/test/SemaObjC/alias-test-2.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/alias-test-2.m b/clang/test/SemaObjC/alias-test-2.m
new file mode 100644
index 00000000000..0a17846685c
--- /dev/null
+++ b/clang/test/SemaObjC/alias-test-2.m
@@ -0,0 +1,16 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface Super @end
+
+@interface MyWpModule @end
+
+@compatibility_alias MyAlias MyWpModule;
+
+@compatibility_alias AliasForSuper Super;
+
+@interface MyAlias : AliasForSuper // expected-error {{duplicate interface declaration for class 'MyWpModule'}}
+@end
+
+@implementation MyAlias : AliasForSuper
+@end
+
OpenPOWER on IntegriCloud