2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-04-03 02:37:59 +08:00
|
|
|
|
|
|
|
@interface Test {}
|
|
|
|
+ (Test*)one;
|
|
|
|
- (int)two;
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
return Test.one.two;
|
|
|
|
}
|
|
|
|
|
2014-04-22 04:22:17 +08:00
|
|
|
// rdar://16650575
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface RootClass {
|
|
|
|
Class isa;
|
|
|
|
}
|
|
|
|
|
|
|
|
@property int property;
|
|
|
|
-(int)method;
|
|
|
|
- (void) setMethod : (int)arg;
|
|
|
|
+(int)classMethod;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Subclass : RootClass @end
|
|
|
|
void Test1() {
|
|
|
|
// now okay
|
|
|
|
(void)RootClass.property;
|
|
|
|
(void)Subclass.property;
|
|
|
|
(void)RootClass.method;
|
|
|
|
(void)Subclass.method;
|
|
|
|
|
|
|
|
RootClass.property = 1;
|
|
|
|
Subclass.property = 2;
|
|
|
|
RootClass.method = 3;
|
|
|
|
Subclass.method = 4;
|
|
|
|
|
|
|
|
// okay
|
|
|
|
(void)RootClass.classMethod;
|
|
|
|
(void)Subclass.classMethod;
|
|
|
|
|
|
|
|
// also okay
|
2014-07-19 06:59:10 +08:00
|
|
|
(void)[RootClass property];
|
|
|
|
(void)[Subclass property];
|
2014-04-22 04:22:17 +08:00
|
|
|
[RootClass method];
|
|
|
|
[Subclass method];
|
|
|
|
[RootClass classMethod];
|
|
|
|
[Subclass classMethod];
|
|
|
|
|
|
|
|
// also okay
|
|
|
|
[RootClass setProperty : 1];
|
|
|
|
[Subclass setProperty : 2];
|
|
|
|
[RootClass setMethod : 3];
|
|
|
|
[Subclass setMethod : 4];
|
|
|
|
}
|