File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck --completion-output-dir %t
3
+
4
+ protocol Shape { }
5
+
6
+ struct Square : Shape { }
7
+
8
+ struct Test {
9
+ let protocolType : Shape
10
+ let structType : Square
11
+
12
+ func testAny( ) -> any Shape {
13
+ return self . #^WITH_ANY_CONTEXTUAL_TYPE^#
14
+ // WITH_ANY_CONTEXTUAL_TYPE-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: protocolType[#any Shape#];
15
+ // WITH_ANY_CONTEXTUAL_TYPE-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: structType[#Square#];
16
+ }
17
+
18
+ func testSome( ) -> some Shape {
19
+ return self . #^WITH_SOME_CONTEXTUAL_TYPE^#
20
+ // WITH_SOME_CONTEXTUAL_TYPE-DAG: Decl[InstanceVar]/CurrNominal: protocolType[#any Shape#];
21
+ // WITH_SOME_CONTEXTUAL_TYPE-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: structType[#Square#];
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments