Commit 2d93585
committed
SIL: Look through SILBoxType when checking for invalid non-escaping function value captures
While you can't write a noescape function type explicitly except
on a function-typed parameter, you can still assign the value of
such a parameter to another 'let' or 'var' with an inferred type.
We correctly handled the 'let' case, but in the 'var' case the
value is wrapped inside a SILBoxType, so we have to look through
that.
Fixes <rdar://problem/70822136>.1 parent b03d246 commit 2d93585
File tree
2 files changed
+27
-3
lines changed- lib/SILOptimizer/Mandatory
- test/SILOptimizer
2 files changed
+27
-3
lines changedLines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
292 | 308 | | |
293 | 309 | | |
294 | 310 | | |
| |||
314 | 330 | | |
315 | 331 | | |
316 | 332 | | |
317 | | - | |
| 333 | + | |
318 | 334 | | |
319 | | - | |
320 | 335 | | |
321 | 336 | | |
322 | 337 | | |
| |||
416 | 431 | | |
417 | 432 | | |
418 | 433 | | |
419 | | - | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
0 commit comments