2009-04-22 13:57:30 +08:00
|
|
|
|
2009-04-22 14:29:42 +08:00
|
|
|
@protocol foo;
|
2018-08-18 06:18:08 +08:00
|
|
|
@protocol foo2
|
|
|
|
@end
|
2009-04-22 14:45:28 +08:00
|
|
|
@class itf;
|
2009-04-22 13:57:30 +08:00
|
|
|
|
2009-04-22 14:40:03 +08:00
|
|
|
// Expressions
|
2009-04-22 14:29:42 +08:00
|
|
|
typedef typeof(@"foo" "bar") objc_string;
|
|
|
|
typedef typeof(@encode(int)) objc_encode;
|
2018-08-18 06:18:08 +08:00
|
|
|
typedef typeof(@protocol(foo2)) objc_protocol;
|
2009-04-23 18:39:46 +08:00
|
|
|
typedef typeof(@selector(noArgs)) objc_selector_noArgs;
|
|
|
|
typedef typeof(@selector(oneArg:)) objc_selector_oneArg;
|
|
|
|
typedef typeof(@selector(foo:bar:)) objc_selector_twoArg;
|
2009-04-22 14:29:42 +08:00
|
|
|
|
|
|
|
|
2009-04-22 14:40:03 +08:00
|
|
|
// Types.
|
|
|
|
typedef typeof(id<foo>) objc_id_protocol_ty;
|
2009-04-22 14:29:42 +08:00
|
|
|
|
2009-04-22 14:45:28 +08:00
|
|
|
typedef typeof(itf*) objc_interface_ty;
|
|
|
|
typedef typeof(itf<foo>*) objc_qual_interface_ty;
|
2011-11-15 14:20:27 +08:00
|
|
|
|
|
|
|
@interface PP
|
|
|
|
@property (assign) id prop;
|
|
|
|
@end
|
|
|
|
|
|
|
|
static inline id getPseudoObject(PP *p) {
|
|
|
|
return p.prop;
|
|
|
|
}
|