Commit f859640
authored
Fix i18518 (#18520)
Fix #18518.
It is an implementation restriction that a value parameter has to follow
a type abstraction. So `[X] -> T ->{x} U` should be rejected as a
capturing type follows the type abstraction,but it wasn't. This PR
refines the check in `Parsers.scala` to reject this case properly.File tree
2 files changed
+10
-0
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests/neg-custom-args/captures
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1422 | 1427 | | |
1423 | 1428 | | |
1424 | 1429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments