forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDE] Resolve
[.]Type
completion for (any P).
to produce singleto…
…n metatype instead of existential metatype. Resolves swiftlang#65843
- Loading branch information
1 parent
bc4eeb8
commit d27484a
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: %empty-directory(%t) | ||
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t | ||
|
||
protocol P {} | ||
|
||
(any P).#^COMPLETE?^# | ||
// COMPLETE: Begin completions, 3 items | ||
// COMPLETE: Keyword[self]/CurrNominal: self[#(any P).Type#]; name=self | ||
// COMPLETE: Keyword/CurrNominal: Protocol[#(any P).Type#]; name=Protocol | ||
// COMPLETE: Keyword/CurrNominal: Type[#(any P).Type#]; name=Type | ||
|
||
|
||
P.Type.#^PROTOCOLTYPE_DOT_1?^# | ||
// PROTOCOLTYPE_DOT_1: Begin completions, 3 items | ||
// PROTOCOLTYPE_DOT_1: Keyword[self]/CurrNominal: self[#(any P.Type).Type#]; name=self | ||
// PROTOCOLTYPE_DOT_1: Keyword/CurrNominal: Protocol[#(any P.Type).Type#]; name=Protocol | ||
// PROTOCOLTYPE_DOT_1: Keyword/CurrNominal: Type[#any P.Type.Type#]; name=Type | ||
|
||
(P).Type.#^PROTOCOLTYPE_DOT_2?^# | ||
// PROTOCOLTYPE_DOT_2: Begin completions, 3 items | ||
// PROTOCOLTYPE_DOT_2: Keyword[self]/CurrNominal: self[#(any (P).Type).Type#]; name=self | ||
// PROTOCOLTYPE_DOT_2: Keyword/CurrNominal: Protocol[#(any (P).Type).Type#]; name=Protocol | ||
// PROTOCOLTYPE_DOT_2: Keyword/CurrNominal: Type[#any (P).Type.Type#]; name=Type |