Commit e6b7e3d
committed
Better error message for polytypes wrapping capturing types
A type like
[X] -> A ->{c} B
is currently not allowed since it expands to a PolyType wrapping a CapturingType and we
have an implementation restriction that requires PolyTypes to wrap only FunctionTypes. It
would be great if we could lift that implementation restriction. Until we do so, we should
have a better error message, which is commit implements.1 parent ebbd685 commit e6b7e3d
File tree
3 files changed
+33
-20
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests/neg-custom-args/captures
3 files changed
+33
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
521 | 537 | | |
522 | 538 | | |
523 | 539 | | |
| |||
1539 | 1555 | | |
1540 | 1556 | | |
1541 | 1557 | | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | 1558 | | |
1548 | 1559 | | |
1549 | 1560 | | |
| |||
1757 | 1768 | | |
1758 | 1769 | | |
1759 | 1770 | | |
1760 | | - | |
1761 | | - | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
| 1771 | + | |
1767 | 1772 | | |
1768 | 1773 | | |
1769 | 1774 | | |
| |||
2360 | 2365 | | |
2361 | 2366 | | |
2362 | 2367 | | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
| 2368 | + | |
2371 | 2369 | | |
2372 | 2370 | | |
2373 | 2371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments