[CS] Re-introduce some assertions

These FIXMEs appear to now be outdated.

This commit also adds an additional assertion in
`bindTypeVariable`.
This commit is contained in:
Hamish Knight
2020-03-20 22:35:32 -07:00
parent c74a7512f7
commit e71d921e43
2 changed files with 6 additions and 12 deletions

View File

@@ -428,6 +428,9 @@ void ConstraintGraph::mergeNodes(TypeVariableType *typeVar1,
}
void ConstraintGraph::bindTypeVariable(TypeVariableType *typeVar, Type fixed) {
assert(!fixed->is<TypeVariableType>() &&
"Cannot bind to type variable; merge equivalence classes instead");
// If there are no type variables in the fixed type, there's nothing to do.
if (!fixed->hasTypeVariable())
return;