Commit caf30e3
committed
fix(#18265): crash on extension method without body
This commit fixes a bug that causes Scala compiler to crash due to position error
when an extension method followed by a newline has neither type annotation nor `= <expr>`.
This commit is based on #18445.
Co-Authored-By: @hamzaremmal1 parent 89a8fce commit caf30e3
File tree
3 files changed
+13
-0
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests/neg
3 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
2580 | 2582 | | |
2581 | 2583 | | |
2582 | 2584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments