Fariborz Jahanian | dc36dc1 | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
Steve Naroff | 1422a62 | 2008-11-18 19:15:30 +0000 | [diff] [blame] | 3 | // Note: GCC doesn't produce any of the following errors. |
| 4 | @interface Super @end // expected-error {{previous definition is here}} |
Fariborz Jahanian | dc36dc1 | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 5 | |
Chris Lattner | 5b25065 | 2008-11-23 22:46:27 +0000 | [diff] [blame^] | 6 | @interface MyWpModule @end // expected-note {{previous definition is here}} |
Fariborz Jahanian | dc36dc1 | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 7 | |
| 8 | @compatibility_alias MyAlias MyWpModule; |
| 9 | |
| 10 | @compatibility_alias AliasForSuper Super; |
| 11 | |
Chris Lattner | 5b25065 | 2008-11-23 22:46:27 +0000 | [diff] [blame^] | 12 | @interface MyAlias : AliasForSuper // expected-error {{duplicate interface definition for class 'MyWpModule'}} |
Fariborz Jahanian | dc36dc1 | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
Steve Naroff | 1422a62 | 2008-11-18 19:15:30 +0000 | [diff] [blame] | 15 | @implementation MyAlias : AliasForSuper // expected-error {{conflicting super class name 'Super'}} |
Fariborz Jahanian | dc36dc1 | 2007-10-12 19:38:20 +0000 | [diff] [blame] | 16 | @end |
| 17 | |