summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/property-noprotocol-warning.m
blob: 95ec15aa1e0cc9a819294410d50295e5a830390e (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
30
31
32
33
34
35
36
// RUN: clang-cc -fsyntax-only -verify %s


@interface Object
+ (id) new;
@end

@protocol GCObject
@property int class;
@end

@protocol DerivedGCObject <GCObject>
@property int Dclass;
@end

@interface GCObject  : Object <DerivedGCObject> {
    int ifield;
    int iOwnClass;
    int iDclass;
}
@property int OwnClass;
@end

@implementation GCObject : Object
@synthesize class=ifield;
@synthesize Dclass=iDclass;
@synthesize OwnClass=iOwnClass;
@end

int main(int argc, char **argv) {
    GCObject *f = [GCObject new];
    f.class = 5;
    f.Dclass = 1;
    f.OwnClass = 3;
    return f.class + f.Dclass  + f.OwnClass - 9;
}
OpenPOWER on IntegriCloud