brintos

brintos / llvm-project-archived public Read only

0
0
Text · 962 B · 80cedc3 Raw
37 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3/**4When processing @synthesize, treat ivars in a class extension the same as ivars in the class @interface, 5and treat ivars in a superclass extension the same as ivars in the superclass @interface.6In particular, when searching for an ivar to back an @synthesize, do look at ivars in the class's own class 7extension but ignore any ivars in superclass class extensions.8*/9 10@interface Super {11  	int ISA;12}13@end14 15@interface Super() {16  int Property;		// expected-note {{previously declared 'Property' here}}17}18@end19 20@interface SomeClass : Super {21        int interfaceIvar1;22        int interfaceIvar2;23}24@property int Property;25@property int Property1;26@end27 28@interface SomeClass () {29  int Property1;30}31@end32 33@implementation SomeClass 34@synthesize Property;	// expected-error {{property 'Property' attempting to use instance variable 'Property' declared in super class 'Super'}}35@synthesize Property1;	// OK36@end37