Skip to content

Commit b5a8ebf

Browse files
committed
[NCGenerics] workaround availability issue
In the Concurrency module, an unavailable Sendable extension triggers an error about unavailable Copyable conformance. This conformance came through in the SubstitutionMap of a BoundGenericType, so I think it's ok to just ignore these.
1 parent 64d43f9 commit b5a8ebf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,6 +2824,10 @@ bool swift::diagnoseExplicitUnavailability(SourceLoc loc,
28242824
if (isInsideCompatibleUnavailableDeclaration(ext, where, attr))
28252825
return false;
28262826

2827+
// Invertible protocols are never unavailable.
2828+
if (rootConf->getProtocol()->getInvertibleProtocolKind())
2829+
return false;
2830+
28272831
ASTContext &ctx = ext->getASTContext();
28282832
auto &diags = ctx.Diags;
28292833

0 commit comments

Comments
 (0)