mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Type checker] Don’t simplify to an error type.
Type variables cannot be bound to error types, so don’t simplify to them.
This commit is contained in:
@@ -1755,7 +1755,7 @@ Type simplifyTypeImpl(ConstraintSystem &cs, Type type, Fn getFixedTypeFn) {
|
|||||||
assocType->getDeclContext());
|
assocType->getDeclContext());
|
||||||
auto result = assocType->getDeclaredInterfaceType().subst(subs);
|
auto result = assocType->getDeclaredInterfaceType().subst(subs);
|
||||||
|
|
||||||
if (result)
|
if (result && !result->hasError())
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user