Skip to content

Commit dda0f50

Browse files
author
Amritpan Kaur
committed
Switch types for keypath diagnostics where
where contextual type and value types capabilities do not match.
1 parent a70b040 commit dda0f50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12202,7 +12202,7 @@ ConstraintSystem::simplifyKeyPathConstraint(
1220212202
(definitelyKeyPathType && capability == ReadOnly)) {
1220312203
auto resolvedKPTy =
1220412204
BoundGenericType::get(kpDecl, nullptr, {rootTy, valueTy});
12205-
return matchTypes(keyPathTy, resolvedKPTy, ConstraintKind::Bind, subflags,
12205+
return matchTypes(resolvedKPTy, keyPathTy, ConstraintKind::Bind, subflags,
1220612206
loc);
1220712207
} else {
1220812208
addUnsolvedConstraint(Constraint::create(*this, ConstraintKind::KeyPath,

0 commit comments

Comments
 (0)