Skip to content

Commit d151118

Browse files
committed
[CSSimplify] Don't erase sugar while forming locators for generic types during matching
Fixes retrieve information form locators which means that we need to preserve the original form for diagnostics.
1 parent 911933e commit d151118

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,8 +3927,8 @@ ConstraintSystem::matchDeepEqualityTypes(Type type1, Type type2,
39273927

39283928
if (shouldAttemptFixes()) {
39293929
auto *baseLoc =
3930-
getConstraintLocator(locator, {LocatorPathElt::GenericType(bound1),
3931-
LocatorPathElt::GenericType(bound2)});
3930+
getConstraintLocator(locator, {LocatorPathElt::GenericType(type1),
3931+
LocatorPathElt::GenericType(type2)});
39323932

39333933
auto argMatchingFlags = subflags;
39343934
// Allow the solver to produce separate fixes while matching

0 commit comments

Comments
 (0)