Skip to content

Commit 056493b

Browse files
committed
NCGenerics: fix !hasTypeVariable() assert
1 parent 1c2dbf4 commit 056493b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11908,9 +11908,10 @@ ConstraintSystem::simplifyBridgingConstraint(Type type1,
1190811908
if (type1->isTypeVariableOrMember() || type2->isTypeVariableOrMember())
1190911909
return formUnsolved();
1191011910

11911-
// Noncopyable types can't be involved in bridging conversions since a bridged
11912-
// type assumes the ability to copy.
11913-
if (type1->isNoncopyable()) {
11911+
// Noncopyable & Nonescapable types can't be involved in bridging conversions
11912+
// since a bridged type assumes such abilities are granted.
11913+
if (!type1->hasTypeVariable()
11914+
&& (type1->isNoncopyable() || !type1->isEscapable())) {
1191411915
return SolutionKind::Error;
1191511916
}
1191611917

0 commit comments

Comments
 (0)