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) {
2158
2158
bool shouldError = ctx.isSwiftVersionAtLeast (futureVersion);
2159
2159
2160
2160
// 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 ();
2163
2165
2164
2166
auto diag = diagnose (inaccessibleCandidate->getLoc (),
2165
2167
diag::dynamic_member_lookup_candidate_inaccessible,
You can’t perform that action at this time.
0 commit comments