Skip to content

Commit 8d0a977

Browse files
committed
[CSSimplify] Simplication of ExplicitGenericArguments constraint shouldn't produce ShapeOf
Fix `formUnsolvedConstraint` to use `ExplicitGenericArguments` instead of `ShapeOf` when first type is not yet fully resolved.
1 parent fdfedc6 commit 8d0a977

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13420,11 +13420,11 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
1342013420
auto formUnsolved = [&]() {
1342113421
// If we're supposed to generate constraints, do so.
1342213422
if (flags.contains(TMF_GenerateConstraints)) {
13423-
auto *shapeOf = Constraint::create(
13424-
*this, ConstraintKind::ShapeOf, type1, type2,
13425-
getConstraintLocator(locator));
13423+
auto *explictGenericArgs =
13424+
Constraint::create(*this, ConstraintKind::ExplicitGenericArguments,
13425+
type1, type2, getConstraintLocator(locator));
1342613426

13427-
addUnsolvedConstraint(shapeOf);
13427+
addUnsolvedConstraint(explictGenericArgs);
1342813428
return SolutionKind::Solved;
1342913429
}
1343013430

0 commit comments

Comments
 (0)