Assert if we attempt to bind a type involving ErrorType.

This commit is contained in:
Mark Lacey
2017-05-24 00:02:00 -07:00
committed by Robert Widmann
parent e3bb2bef64
commit e83131da30

View File

@@ -128,6 +128,8 @@ bool ConstraintSystem::typeVarOccursInType(TypeVariableType *typeVar,
void ConstraintSystem::assignFixedType(TypeVariableType *typeVar, Type type,
bool updateState) {
assert(!type->hasError() &&
"Should not be assigning a type involving ErrorType!");
typeVar->getImpl().assignFixedType(type, getSavedBindings());