@protocol p1,p2,p3;
-@interface MyClass1 (Category1) <p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'Category1'}}
+@interface MyClass1 (Category1) <p1> // expected-warning {{cannot find protocol definition for 'p1', referenced by 'Category1'}}
@end
@interface MyClass1 (Category1) // expected-error {{duplicate interface declaration for category 'MyClass1(Category1)'}}
@protocol p3 @end
-@interface MyClass1 (Category) <p2, p3> @end // expected-error {{cannot find protocol definition for 'p2', referenced by 'Category'}}
+@interface MyClass1 (Category) <p2, p3> @end // expected-warning {{cannot find protocol definition for 'p2', referenced by 'Category'}}
@interface MyClass (Category) @end // expected-error {{cannot find interface declaration for 'MyClass'}}
@protocol SUPER;
-@interface SUPER <SUPER> @end // expected-error {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
+@interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER', referenced by 'SUPER'}}
typedef int INTF; // expected-error {{previous definition is here}}
@interface I1 <p1> @end
-@interface E1 <p2> @end // expected-error {{cannot find protocol definition for 'p2', referenced by 'E1'}}
+@interface E1 <p2> @end // expected-warning {{cannot find protocol definition for 'p2', referenced by 'E1'}}
@protocol p2 @end
@interface I2 <p1,p2> @end
-@interface E2 <p1,p2,p3> @end // expected-error {{cannot find protocol definition for 'p3', referenced by 'E2'}}
+@interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3', referenced by 'E2'}}
@class U1, U2;
- (void) meth { [self contents]; }
@end
+typedef struct _NSPoint {
+ float x;
+ float y;
+} NSPoint;
+
+typedef struct _NSSize {
+ float width;
+ float height;
+} NSSize;
+
+typedef struct _NSRect {
+ NSPoint origin;
+ NSSize size;
+} NSRect;
+
+@interface AnyClass
+- (NSRect)rect;
+@end
+
+@class Helicopter;
+
+static void func(Helicopter *obj) {
+ // Note that the proto for "rect" is found in the global pool even when
+ // a statically typed object's class interface isn't in scope! This
+ // behavior isn't very desirable, however wee need it for GCC compatibility.
+ NSRect r = [obj rect];
+}
- (INTF1<p1>*) meth;
@end
-@protocol PROTO2<p1> // expected-error {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
+@protocol PROTO2<p1> // expected-warning {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
@end
@protocol p1 @end
@protocol p2 <p1>
@end
-@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-error {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
+@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
@end