Commit 8c80c31
committed
Fix #8067: Don't constrain with types of wrong kinds
The example got into a pickle since it tried to constrain a type variable
A[_] with a type (G[_] => G[String]). It should have rejected this outright.
Instead the constraint addition succeeded and the compiler got into a dead-end
with it afterwards.1 parent eb04b8f commit 8c80c31
File tree
2 files changed
+16
-2
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
2 files changed
+16
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
527 | 531 | | |
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
531 | 535 | | |
532 | | - | |
533 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
534 | 539 | | |
535 | 540 | | |
536 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments