blob: 93a600aef32e937dcb8aaa47a35a55fa4d3dd229 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
@interface I1
- (void)method;
@end
@implementation I1
- (void)method {
struct x { };
[x method]; // expected-error{{invalid receiver to message expression}}
}
@end
typedef struct { int x; } ivar;
@interface I2 {
id ivar;
}
- (void)method;
+ (void)method;
@end
@implementation I2
- (void)method {
[ivar method];
}
+ (void)method {
[ivar method]; // expected-error{{invalid receiver to message expression}}
}
@end
|