File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,10 @@ Type ASTBuilder::createFunctionType(
313
313
.withVariadic (flags.isVariadic ())
314
314
.withAutoClosure (flags.isAutoClosure ());
315
315
316
+ if (auto *fnType = type->getAs <FunctionType>())
317
+ if (!fnType->isNoEscape ())
318
+ parameterFlags = parameterFlags.withEscaping (true );
319
+
316
320
funcParams.push_back (AnyFunctionType::Param (type, label, parameterFlags));
317
321
}
318
322
Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ do {
116
116
blackHole ( metatype)
117
117
}
118
118
119
+ do {
120
+ let escaping : ( @escaping ( ) -> ( ) ) -> ( ) = { _ in }
121
+ blackHole ( escaping)
122
+ }
119
123
// DEMANGLE: $syycD
120
124
// DEMANGLE: $sySSzcD
121
125
// DEMANGLE: $sySSncD
131
135
// DEMANGLE: $sSi_SfSitD
132
136
// DEMANGLE: $sSim_Sf1xSitD
133
137
// DEMANGLE: $sSi1x_SfSim1ytD
138
+ // DEMANGLE: $syyyccD
134
139
135
140
// CHECK: () -> ()
136
141
// CHECK: (inout String) -> ()
147
152
// CHECK: (Int, Float, Int)
148
153
// CHECK: (Int.Type, x: Float, Int)
149
154
// CHECK: (x: Int, Float, y: Int.Type)
155
+ // CHECK: (@escaping () -> ()) -> ()
150
156
151
157
// DEMANGLE: $sSimD
152
158
// DEMANGLE: $syycmD
164
170
// DEMANGLE: $sSi_SfSitmD
165
171
// DEMANGLE: $sSim_Sf1xSitmD
166
172
// DEMANGLE: $sSi1x_SfSim1ytmD
173
+ // DEMANGLE: $syyyccmD
167
174
168
175
// CHECK: Int.Type
169
176
// CHECK: ((inout String) -> ()).Type
180
187
// CHECK: (Int, Float, Int).Type
181
188
// CHECK: (Int.Type, x: Float, Int).Type
182
189
// CHECK: (x: Int, Float, y: Int.Type).Type
190
+ // CHECK: ((@escaping () -> ()) -> ()).Type
You can’t perform that action at this time.
0 commit comments