@@ -2394,10 +2394,7 @@ ConstraintSystem::matchTypesBindTypeVar(
2394
2394
TypeMatchOptions flags, ConstraintLocatorBuilder locator,
2395
2395
llvm::function_ref<TypeMatchResult()> formUnsolvedResult) {
2396
2396
assert (typeVar->is <TypeVariableType>() && " Expected a type variable!" );
2397
- // FIXME: Due to some SE-0110 related code farther up we can end
2398
- // up with type variables wrapped in parens that will trip this
2399
- // assert. For now, maintain the existing behavior.
2400
- // assert(!type->is<TypeVariableType>() && "Expected a non-type variable!");
2397
+ assert (!type->is <TypeVariableType>() && " Expected a non-type variable!" );
2401
2398
2402
2399
// Simplify the right-hand type and perform the "occurs" check.
2403
2400
typeVar = getRepresentative (typeVar);
@@ -4104,14 +4101,8 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
4104
4101
return getTypeMatchSuccess ();
4105
4102
}
4106
4103
4107
- assert ((type1->is <TypeVariableType>() || type2->is <TypeVariableType>()) &&
4108
- " Expected a type variable!" );
4109
- // FIXME: Due to some SE-0110 related code farther up we can end
4110
- // up with type variables wrapped in parens that will trip this
4111
- // assert. For now, maintain the existing behavior.
4112
- // assert(
4113
- // (!type1->is<TypeVariableType>() || !type2->is<TypeVariableType>())
4114
- // && "Expected a non-type variable!");
4104
+ assert ((type1->is <TypeVariableType>() != type2->is <TypeVariableType>()) &&
4105
+ " Expected a type variable and a non type variable!" );
4115
4106
4116
4107
auto *typeVar = typeVar1 ? typeVar1 : typeVar2;
4117
4108
auto type = typeVar1 ? type2 : type1;
0 commit comments