diff options
Diffstat (limited to 'test/SemaObjC/forward-class-1.m')
-rw-r--r-- | test/SemaObjC/forward-class-1.m | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/SemaObjC/forward-class-1.m b/test/SemaObjC/forward-class-1.m index ab213fb..de94e88 100644 --- a/test/SemaObjC/forward-class-1.m +++ b/test/SemaObjC/forward-class-1.m @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -@class FOO, BAR; +@class FOO, BAR; // expected-note {{forward class is declared here}} @class FOO, BAR; -@interface INTF : FOO // expected-error {{cannot find interface declaration for 'FOO', superclass of 'INTF'}} +@interface INTF : FOO // expected-error {{attempting to use the forward class 'FOO' as superclass of 'INTF'}} @end @interface FOO @@ -45,3 +45,14 @@ typedef NSObject <XCElementP> XCElement; @end +// rdar://9653341 +@class B; // expected-note {{forward class is declared here}} +@interface A : B {} // expected-error {{attempting to use the forward class 'B' as superclass of 'A'}} +@end + +@interface B : A {} +@end + +@implementation A @end +@implementation B @end + |