[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.
This commit is contained in:
Pavel Yaskevich
2024-08-22 14:46:33 -07:00
parent 911933e25d
commit d151118833

View File

@@ -3927,8 +3927,8 @@ ConstraintSystem::matchDeepEqualityTypes(Type type1, Type type2,
if (shouldAttemptFixes()) {
auto *baseLoc =
getConstraintLocator(locator, {LocatorPathElt::GenericType(bound1),
LocatorPathElt::GenericType(bound2)});
getConstraintLocator(locator, {LocatorPathElt::GenericType(type1),
LocatorPathElt::GenericType(type2)});
auto argMatchingFlags = subflags;
// Allow the solver to produce separate fixes while matching