Skip to content

Commit 4475011

Browse files
committed
Sema: You can't simplify types while preparing an overload
1 parent 906e9cb commit 4475011

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ std::optional<Type> ConstraintSystem::isSetType(Type type) {
10851085

10861086
Type ConstraintSystem::getFixedTypeRecursive(Type type, TypeMatchOptions &flags,
10871087
bool wantRValue) {
1088+
ASSERT(!PreparingOverload);
10881089

10891090
if (wantRValue)
10901091
type = type->getRValueType();
@@ -1753,6 +1754,8 @@ Type ConstraintSystem::simplifyTypeImpl(Type type,
17531754
}
17541755

17551756
Type ConstraintSystem::simplifyType(Type type) {
1757+
ASSERT(!PreparingOverload);
1758+
17561759
if (!type->hasTypeVariable())
17571760
return type;
17581761

0 commit comments

Comments
 (0)