Commit 1c5364c
committed
RHS of var def is an expr
Leading underscore short-circuited `var f: Int => Int = _ + 1`.
Also remove an extraneous `toList`.
The test for default var value should narrowly
accept only the correct syntax.
Ports scala/bug#114371 parent d37a543 commit 1c5364c
File tree
3 files changed
+28
-5
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests
- neg
- pos
3 files changed
+28
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3146 | 3146 | | |
3147 | 3147 | | |
3148 | 3148 | | |
3149 | | - | |
| 3149 | + | |
3150 | 3150 | | |
3151 | 3151 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
3155 | 3161 | | |
3156 | | - | |
| 3162 | + | |
3157 | 3163 | | |
3158 | 3164 | | |
3159 | 3165 | | |
| |||
| 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 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments