Commit 9aa08e2
authored
Avoid box failures and better diagnosis if they come back (#24546)
The first commit gives a better error message for box failures. At least
we don't get
Note that cap is not included in {}
anymore. To make this even better we'd have to trace back a box failure
to the original types we were trying to compare. Right now the box
failure error notes are too disconnected from the rest. But they become
clearer when one compiles with -explain.
The second commit fixes the underlying problem. The neg tests are now
pos tests. I kept the special error message for better diagnosis if the
mismatch arises elsewhere. The mismatch still persists in eta.scala. We
should investigate
whether that's legit or not.
Fixes #24543File tree
5 files changed
+47
-9
lines changed- compiler/src/dotty/tools/dotc
- cc
- core
- tests
- neg-custom-args/captures
- pos-custom-args/captures
5 files changed
+47
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
| |||
1341 | 1344 | | |
1342 | 1345 | | |
1343 | 1346 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1347 | 1353 | | |
1348 | 1354 | | |
1349 | 1355 | | |
1350 | 1356 | | |
1351 | 1357 | | |
1352 | | - | |
| 1358 | + | |
| 1359 | + | |
1353 | 1360 | | |
1354 | 1361 | | |
1355 | 1362 | | |
| |||
1390 | 1397 | | |
1391 | 1398 | | |
1392 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1393 | 1405 | | |
1394 | 1406 | | |
1395 | 1407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
553 | 560 | | |
554 | | - | |
555 | | - | |
556 | | - | |
| 561 | + | |
557 | 562 | | |
558 | 563 | | |
559 | 564 | | |
| |||
2928 | 2933 | | |
2929 | 2934 | | |
2930 | 2935 | | |
2931 | | - | |
| 2936 | + | |
2932 | 2937 | | |
2933 | 2938 | | |
2934 | 2939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments