File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -3716,23 +3716,23 @@ object Parsers {
37163716 ts ++= topStatSeq()
37173717 }
37183718 }
3719- else {
3719+ else
37203720 val pkg = qualId()
3721+ var continue = false
37213722 indentRegion(pkg) {
37223723 possibleTemplateStart()
3723- if ( in.token == EOF )
3724+ if in.token == EOF then
37243725 ts += makePackaging(start, pkg, List ())
3725- else if ( in.isNestedStart) {
3726+ else if in.isNestedStart then
37263727 ts += inDefScopeBraces(makePackaging(start, pkg, topStatSeq()))
3727- acceptStatSepUnlessAtEnd()
3728- ts ++= topStatSeq()
3729- }
3730- else {
3728+ continue = true
3729+ else
37313730 acceptStatSep()
37323731 ts += makePackaging(start, pkg, topstats())
3733- }
37343732 }
3735- }
3733+ if continue then
3734+ acceptStatSepUnlessAtEnd()
3735+ ts ++= topStatSeq()
37363736 }
37373737 else
37383738 ts ++= topStatSeq()
Original file line number Diff line number Diff line change 1+ package foo with
2+ package bar with
3+ object A with
4+ def foo = 1
5+ end bar
6+ end foo
7+ package baz with
8+ object B with
9+ def f = foo.bar.A .foo
10+ end baz
You can’t perform that action at this time.
0 commit comments