[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:
Doug Gregor
2017-11-28 16:14:06 -08:00
parent 49326e08c5
commit d8fddee726

View File

@@ -1755,7 +1755,7 @@ Type simplifyTypeImpl(ConstraintSystem &cs, Type type, Fn getFixedTypeFn) {
assocType->getDeclContext());
auto result = assocType->getDeclaredInterfaceType().subst(subs);
if (result)
if (result && !result->hasError())
return result;
}