blob: abf1b02b85dc761cb79b2de26b1b8d68c56d61a8 [file] [log] [blame]
#import <Foundation/NSObject.h>
@interface NullableInterface : NSObject {
}
+(BOOL) isNullWithNullableNSObjectArg:(nullable NSObject *)x;
+(BOOL) isNullWithNotNullableNSObjectPtrArg:(NSObject *)x;
+(nullable NSObject *) returnNil:(BOOL)r;
@property (nullable, retain) NSObject *nullableObjectProperty;
@end
@implementation NullableInterface
+(BOOL) isNullWithNullableNSObjectArg:(nullable NSObject *)x {
return x == NULL;
}
+(BOOL) isNullWithNotNullableNSObjectPtrArg:(NSObject *)x {
return x == NULL;
}
+(nullable NSObject *) returnNil:(BOOL)r {
if (r) {
return nil;
} else {
return [NSObject new];
}
}
@end