Commit e9f7a6a
committed
[CSClosure] Delay type-checking of local functions until body is rewritten
A local function can capture a variable that has been declared after it,
which means that type-checking such declaration in-order would trigger
sub-typecheck that would corrupt AST underness the solution application
walker.1 parent 26d8552 commit e9f7a6a
File tree
2 files changed
+50
-1
lines changed- lib/Sema
- test/expr/closure
2 files changed
+50
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
| |||
1048 | 1051 | | |
1049 | 1052 | | |
1050 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1051 | 1062 | | |
1052 | 1063 | | |
1053 | 1064 | | |
| |||
1456 | 1467 | | |
1457 | 1468 | | |
1458 | 1469 | | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
1459 | 1483 | | |
1460 | 1484 | | |
1461 | 1485 | | |
| |||
1552 | 1576 | | |
1553 | 1577 | | |
1554 | 1578 | | |
1555 | | - | |
| 1579 | + | |
1556 | 1580 | | |
1557 | 1581 | | |
1558 | 1582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
0 commit comments