File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -code-complete-call-pattern-heuristics -disable-objc-attr-requires-foundation-module
3
+
4
+ // SE-0353
5
+ struct ConstraintedExistentialTest {
6
+ protocol Producer < Event> {
7
+ associatedtype Event
8
+ }
9
+
10
+ struct StringProducer : Producer {
11
+ typealias Event = String
12
+ }
13
+
14
+ struct IntProducer : Producer {
15
+ typealias Event = Int
16
+ }
17
+
18
+ func takeStringProducer( producer: any Producer < String > ) { }
19
+
20
+ let intProducer : IntProducer
21
+ let stringProducer : StringProducer
22
+
23
+ func test( ) {
24
+ takeStringProducer ( self . #^IN_CONSTRAINTED_EXISTENTIAL_CONTEXT^#)
25
+ }
26
+ // IN_CONSTRAINTED_EXISTENTIAL_CONTEXT: Begin completions
27
+ // IN_CONSTRAINTED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal: intProducer[#IntProducer#];
28
+ // IN_CONSTRAINTED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: stringProducer[#StringProducer#];
29
+ // IN_CONSTRAINTED_EXISTENTIAL_CONTEXT: End completions
30
+ }
You can’t perform that action at this time.
0 commit comments