Skip to content

Commit 958138d

Browse files
committed
[Sema] Only warn on uses of an implicitly imported conformances in API
Until Swift 6, always downgrade to a warning the diagnostic on the use in API of a conformance that wasn't imported by the local source file. rdar://98851314
1 parent 9e4a00d commit 958138d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/ResilienceDiagnostics.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ TypeChecker::diagnoseConformanceExportability(SourceLoc loc,
241241
static_cast<unsigned>(*reason),
242242
M->getName(),
243243
static_cast<unsigned>(originKind))
244-
.warnUntilSwiftVersionIf(useConformanceAvailabilityErrorsOption &&
245-
!ctx.LangOpts.EnableConformanceAvailabilityErrors,
244+
.warnUntilSwiftVersionIf((useConformanceAvailabilityErrorsOption &&
245+
!ctx.LangOpts.EnableConformanceAvailabilityErrors) ||
246+
originKind == DisallowedOriginKind::ImplicitlyImported,
246247
6);
247248
return true;
248249
}

0 commit comments

Comments
 (0)