File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -4777,21 +4777,18 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
47774777 // The only additional condition we need to check is if the var decl
47784778 // had an @objc or @iboutlet property.
47794779
4780- ValueDecl *prop = cast<ValueDecl>( FD->getAccessorStorageDecl () );
4780+ AbstractStorageDecl *storage = FD->getAccessorStorageDecl ();
47814781 // Validate the subscript or property because it might not be type
47824782 // checked yet.
4783- if (isa<SubscriptDecl>(prop))
4784- TC.validateDecl (prop);
4785- else if (isa<VarDecl>(prop))
4786- TC.validateDecl (prop);
4783+ TC.validateDecl (storage);
47874784
4788- if (prop ->getAttrs ().hasAttribute <NonObjCAttr>())
4785+ if (storage ->getAttrs ().hasAttribute <NonObjCAttr>())
47894786 isObjC = None;
4790- else if (!isObjC && prop ->isObjC ())
4787+ else if (!isObjC && storage ->isObjC ())
47914788 isObjC = ObjCReason::DoNotDiagnose;
47924789
4793- // If the property is dynamic, propagate to this accessor.
4794- if (isObjC && prop ->isDynamic () && !FD->isDynamic ())
4790+ // If the storage is dynamic, propagate to this accessor.
4791+ if (isObjC && storage ->isDynamic () && !FD->isDynamic ())
47954792 FD->getAttrs ().add (new (TC.Context ) DynamicAttr (/* implicit*/ true ));
47964793 }
47974794
You can’t perform that action at this time.
0 commit comments