Skip to content

Commit 92a6302

Browse files
committed
[CS] Don't throw away unresolved key path components
When originally implemented (a5ca6cc), we used to append the set `component` to `resolvedComponents`, however that appears to have been refactored away at some point, leaving a couple of dead assignments. Restore the old behaviour by just appending the components.
1 parent dc5f896 commit 92a6302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4253,7 +4253,7 @@ namespace {
42534253
case KeyPathExpr::Component::Kind::UnresolvedProperty: {
42544254
// If we couldn't resolve the component, leave it alone.
42554255
if (!foundDecl) {
4256-
component = origComponent;
4256+
resolvedComponents.push_back(origComponent);
42574257
break;
42584258
}
42594259

@@ -4276,7 +4276,7 @@ namespace {
42764276
case KeyPathExpr::Component::Kind::UnresolvedSubscript: {
42774277
// Leave the component unresolved if the overload was not resolved.
42784278
if (!foundDecl) {
4279-
component = origComponent;
4279+
resolvedComponents.push_back(origComponent);
42804280
break;
42814281
}
42824282

0 commit comments

Comments
 (0)