File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2158,8 +2158,10 @@ visitDynamicMemberLookupAttr(DynamicMemberLookupAttr *attr) {
21582158 bool shouldError = ctx.isSwiftVersionAtLeast (futureVersion);
21592159
21602160 // Diagnose as an error in resilient modules regardless of language
2161- // version since this will break the swiftinterface.
2162- shouldError |= decl->getModuleContext ()->isResilient ();
2161+ // version since this will break the swiftinterface. Don't diagnose
2162+ // cases in existing swiftinterface files, though.
2163+ shouldError |= decl->getModuleContext ()->isResilient () &&
2164+ !decl->getDeclContext ()->isInSwiftinterface ();
21632165
21642166 auto diag = diagnose (inaccessibleCandidate->getLoc (),
21652167 diag::dynamic_member_lookup_candidate_inaccessible,
You can’t perform that action at this time.
0 commit comments