Skip to content

Commit 413dbbc

Browse files
committed
[TypeChecker] Don't try to join to function type with different escapiness
Solver needs to attempt both escaping and non-escaping variants to determine correct error location.
1 parent bb51a8f commit 413dbbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/TypeJoinMeet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ CanType TypeJoin::visitFunctionType(CanType second) {
314314
auto secondExtInfo = secondFnTy->getExtInfo();
315315

316316
// FIXME: Properly handle these attributes.
317-
if (firstExtInfo.withNoEscape(false) != secondExtInfo.withNoEscape(false))
317+
if (firstExtInfo != secondExtInfo)
318318
return Unimplemented;
319319

320320
if (!AnyFunctionType::equalParams(firstFnTy->getParams(),

0 commit comments

Comments
 (0)