Skip to content

Commit 48e883c

Browse files
committed
Revert "[Sema] Record type of identity key paths in the constraint system"
This reverts commit 7577496.
1 parent f494bfc commit 48e883c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,7 @@ namespace {
32323232
break;
32333233
}
32343234
case KeyPathExpr::Component::Kind::Identity:
3235-
break;
3235+
continue;
32363236
case KeyPathExpr::Component::Kind::DictionaryKey:
32373237
llvm_unreachable("DictionaryKey only valid in #keyPath");
32383238
break;

test/IDE/complete_swift_key_path.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GENERIC_KEY_PATH_BASE | %FileCheck %s -check-prefix=PERSONTYPE-DOT
3636
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GENERIC_KEY_PATH_RESULT | %FileCheck %s -check-prefix=PERSONTYPE-DOT
3737

38-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE_AFTER_SELF | %FileCheck %s -check-prefix=OBJ-NODOT
3938
class Person {
4039
var name: String
4140
var friends: [Person] = []
@@ -192,7 +191,3 @@ func genericKeyPathResult<KeyPathResult>(id: KeyPath<Person, KeyPathResult>) {
192191
genericKeyPathResult(\.#^GENERIC_KEY_PATH_RESULT^#)
193192
// Same as TYPE_DOT.
194193
}
195-
196-
func completeAfterSelf(people: [Person]) {
197-
people.map(\.self#^COMPLETE_AFTER_SELF^#)
198-
}

0 commit comments

Comments
 (0)