@@ -24,6 +24,19 @@ func foo1(_ c : CC) -> CC{
24
24
return c. getSelf ( )
25
25
}
26
26
27
+ protocol Foo {
28
+ var bar : String { get }
29
+ }
30
+ func foo( x: Foo ) {
31
+ _ = x. bar
32
+ }
33
+
34
+ func testWithoutActuallyEscaping( closure: ( Int ) -> Void ) {
35
+ withoutActuallyEscaping ( closure) { escapable in
36
+ _ = escapable
37
+ }
38
+ }
39
+
27
40
// RUN: %target-swift-ide-test -range -pos=7:8 -end-pos=7:19 -source-filename %s | %FileCheck %s -check-prefix=CHECK-BOOL
28
41
// CHECK-BOOL: <Type>Bool</Type>
29
42
@@ -37,6 +50,12 @@ func foo1(_ c : CC) -> CC{
37
50
// RUN: %target-swift-ide-test -range -pos=23:20 -end-pos=23:30 -source-filename %s | %FileCheck %s -check-prefix=CHECK-PART-EXPR1
38
51
// RUN: %target-swift-ide-test -range -pos=23:9 -end-pos=23:19 -source-filename %s | %FileCheck %s -check-prefix=CHECK-PART-EXPR1
39
52
53
+ // RUN: %target-swift-ide-test -range -pos=31:7 -end-pos=31:12 -source-filename %s | %FileCheck %s -check-prefix=CHECK-OEE-EXPR
54
+
55
+ // RUN: %target-swift-ide-test -range -pos=35:1 -end-pos=38:1 -source-filename %s | %FileCheck %s -check-prefix=CHECK-MTEE-EXPR-1
56
+ // RUN: %target-swift-ide-test -range -pos=35:27 -end-pos=35:34 -source-filename %s | %FileCheck %s -check-prefix=CHECK-MTEE-EXPR-2
57
+ // RUN: %target-swift-ide-test -range -pos=35:36 -end-pos=37:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-MTEE-EXPR-3
58
+
40
59
// CHECK-PART-EXPR: <Kind>PartOfExpression</Kind>
41
60
// CHECK-PART-EXPR-NEXT: <Content>getSelf()</Content>
42
61
// CHECK-PART-EXPR-NEXT: <Context>swift_ide_test.(file).foo1(_:)</Context>
@@ -50,3 +69,41 @@ func foo1(_ c : CC) -> CC{
50
69
// CHECK-PART-EXPR2: <Parent>Call</Parent>
51
70
// CHECK-PART-EXPR2: <ASTNodes>2</ASTNodes>
52
71
// CHECK-PART-EXPR2: <end>
72
+
73
+ // CHECK-OEE-EXPR: <Kind>SingleExpression</Kind>
74
+ // CHECK-OEE-EXPR-NEXT: <Content>x.bar</Content>
75
+ // CHECK-OEE-EXPR-NEXT: <Type>String</Type><Exit>false</Exit>
76
+ // CHECK-OEE-EXPR-NEXT: <Context>swift_ide_test.(file).foo(x:)</Context>
77
+ // CHECK-OEE-EXPR-NEXT: <ASTNodes>1</ASTNodes>
78
+ // CHECK-OEE-EXPR-NEXT: <end>
79
+
80
+ // CHECK-MTEE-EXPR-1: <Kind>SingleExpression</Kind>
81
+ // CHECK-MTEE-EXPR-1-NEXT: <Content>withoutActuallyEscaping(closure) { escapable in
82
+ // CHECK-MTEE-EXPR-1-NEXT: _ = escapable
83
+ // CHECK-MTEE-EXPR-1-NEXT: }</Content>
84
+ // CHECK-MTEE-EXPR-1-NEXT: <Type>()</Type><Exit>false</Exit>
85
+ // CHECK-MTEE-EXPR-1-NEXT: <Context>swift_ide_test.(file).testWithoutActuallyEscaping(closure:)</Context>
86
+ // CHECK-MTEE-EXPR-1-NEXT: <Declared>escapable</Declared><OutscopeReference>false</OutscopeReference>
87
+ // CHECK-MTEE-EXPR-1-NEXT: <Referenced>closure</Referenced><Type>(Int) -> Void</Type>
88
+ // CHECK-MTEE-EXPR-1-NEXT: <Referenced>escapable</Referenced><Type>(Int) -> Void</Type>
89
+ // CHECK-MTEE-EXPR-1-NEXT: <ASTNodes>1</ASTNodes>
90
+ // CHECK-MTEE-EXPR-1-NEXT: <end>
91
+
92
+ // CHECK-MTEE-EXPR-2: <Kind>SingleExpression</Kind>
93
+ // CHECK-MTEE-EXPR-2-NEXT: <Content>closure</Content>
94
+ // CHECK-MTEE-EXPR-2-NEXT: <Type>(Int) -> Void</Type><Exit>false</Exit>
95
+ // CHECK-MTEE-EXPR-2-NEXT: <Context>swift_ide_test.(file).testWithoutActuallyEscaping(closure:)</Context>
96
+ // CHECK-MTEE-EXPR-2-NEXT: <Referenced>closure</Referenced><Type>(Int) -> Void</Type>
97
+ // CHECK-MTEE-EXPR-2-NEXT: <ASTNodes>1</ASTNodes>
98
+ // CHECK-MTEE-EXPR-2-NEXT: <end>
99
+
100
+ // CHECK-MTEE-EXPR-3: <Kind>SingleExpression</Kind>
101
+ // CHECK-MTEE-EXPR-3-NEXT: <Content>{ escapable in
102
+ // CHECK-MTEE-EXPR-3-NEXT: _ = escapable
103
+ // CHECK-MTEE-EXPR-3-NEXT: }</Content>
104
+ // CHECK-MTEE-EXPR-3-NEXT: <Type>((Int) -> Void) -> ()</Type><Exit>false</Exit>
105
+ // CHECK-MTEE-EXPR-3-NEXT: <Context>swift_ide_test.(file).testWithoutActuallyEscaping(closure:)</Context>
106
+ // CHECK-MTEE-EXPR-3-NEXT: <Declared>escapable</Declared><OutscopeReference>false</OutscopeReference>
107
+ // CHECK-MTEE-EXPR-3-NEXT: <Referenced>escapable</Referenced><Type>(Int) -> Void</Type>
108
+ // CHECK-MTEE-EXPR-3-NEXT: <ASTNodes>1</ASTNodes>
109
+ // CHECK-MTEE-EXPR-3-NEXT: <end>
0 commit comments