Skip to content

Commit e83131d

Browse files
rudkxCodaFi
authored andcommitted
Assert if we attempt to bind a type involving ErrorType.
1 parent e3bb2be commit e83131d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ bool ConstraintSystem::typeVarOccursInType(TypeVariableType *typeVar,
128128

129129
void ConstraintSystem::assignFixedType(TypeVariableType *typeVar, Type type,
130130
bool updateState) {
131-
131+
assert(!type->hasError() &&
132+
"Should not be assigning a type involving ErrorType!");
133+
132134
typeVar->getImpl().assignFixedType(type, getSavedBindings());
133135

134136
if (!updateState)

0 commit comments

Comments
 (0)