diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-08-24 16:35:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-08-24 16:35:14 +0000 |
commit | a75fa8aaf2005c6cb7561a9aa5129a38075939a4 (patch) | |
tree | 94be7b66ac4af783a71d740df76ce40f31e02145 /test/SemaObjC | |
parent | 6aa46a19c56750e17f7acedc47d95111fd2dcd5d (diff) |
Notes
Diffstat (limited to 'test/SemaObjC')
-rw-r--r-- | test/SemaObjC/arc-property-decl-attrs.m | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/SemaObjC/arc-property-decl-attrs.m b/test/SemaObjC/arc-property-decl-attrs.m index ee48d310edc0a..7393f58199f9a 100644 --- a/test/SemaObjC/arc-property-decl-attrs.m +++ b/test/SemaObjC/arc-property-decl-attrs.m @@ -225,3 +225,30 @@ __attribute__((objc_root_class)) @implementation TypeVsSetter @synthesize prop; // expected-note {{property synthesized here}} @end + +@protocol AutoStrongProp + +@property (nonatomic, readonly) NSObject *prop; + +@end + +@protocol AutoStrongProp_Internal <AutoStrongProp> + +// This property gets the 'strong' attribute automatically. +@property (nonatomic, readwrite) NSObject *prop; + +@end + +@interface SynthesizeWithImplicitStrongNoError : NSObject <AutoStrongProp> +@end + +@interface SynthesizeWithImplicitStrongNoError () <AutoStrongProp_Internal> + +@end + +@implementation SynthesizeWithImplicitStrongNoError + +// no error, 'strong' is implicit in the 'readwrite' property. +@synthesize prop = _prop; + +@end |