Commit a574431
committed
Fix printing of classes with companion objects in the decompiler (#4526)
This fixes printing of classes with companion objects so that they don't appear on the same line.
Example case:
class Foo
object Foo
will be decompiled into
class Foo() {}
object Foo {}
where before they would be printed on the same line, failing compilation.1 parent 5d004dc commit a574431
File tree
3 files changed
+6
-1
lines changed- compiler/src/dotty/tools/dotc/printing
- tests/pos
3 files changed
+6
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments