message.mm revision 2725ca8eb3354975ca77ed4b88ede7b60b216b9a
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2@interface I1
3- (void)method;
4@end
5
6@implementation I1
7- (void)method {
8  struct x { };
9  [x method]; // expected-error{{receiver type 'x' is not an Objective-C class}}
10}
11@end
12
13typedef struct { int x; } ivar;
14
15@interface I2 {
16  id ivar;
17}
18- (void)method;
19+ (void)method;
20@end
21
22@implementation I2
23- (void)method {
24  [ivar method];
25}
26+ (void)method {
27  [ivar method]; // expected-error{{receiver type 'ivar' (aka 'ivar') is not an Objective-C class}}
28}
29@end
30