Commit 2bc3c97
committed
Fix #6891: Assertion failed when naming parameter in polymorphic function type
The reason behind the failure was an incorrect desugaring of
polymorphic functions. `[A] => A => A` desugars to, essentially,
`def apply[A](x$1: A): A`. Whereas `[A] => (f: A) => A` desugars
to `def apply[A](x$1: f: A): A`, which of course does not make
sense.1 parent 59b13d5 commit 2bc3c97
File tree
5 files changed
+25
-2
lines changed- compiler/src/dotty/tools/dotc/ast
- tests
- neg
- pos
- run
5 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1500 | 1500 | | |
1501 | 1501 | | |
1502 | 1502 | | |
1503 | | - | |
1504 | | - | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1505 | 1506 | | |
1506 | 1507 | | |
1507 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments