blob: 617ff4ee5c629ff5477223bc5aaa2554780a02e2 [file] [log] [blame]
Douglas Gregor813a0662015-06-19 18:14:38 +00001// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -Wnullable-to-nonnull-conversion %s -verify
2
3
4// rdar://19985330
5@interface NSObject @end
6
7@class NSFoo;
8void foo (NSFoo * __nonnull);
9
10@interface NSBar : NSObject
11@property(weak) NSFoo *property1;
12@end
13
14@implementation NSBar
15- (void) Meth {
16 foo (self.property1); // expected-warning {{implicit conversion from nullable pointer 'NSFoo * __nullable' to non-nullable pointer type 'NSFoo * __nonnull'}}
17}
18@end