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 {
3716
3716
ts ++= topStatSeq()
3717
3717
}
3718
3718
}
3719
- else {
3719
+ else
3720
3720
val pkg = qualId()
3721
+ var continue = false
3721
3722
indentRegion(pkg) {
3722
3723
possibleTemplateStart()
3723
- if ( in.token == EOF )
3724
+ if in.token == EOF then
3724
3725
ts += makePackaging(start, pkg, List ())
3725
- else if ( in.isNestedStart) {
3726
+ else if in.isNestedStart then
3726
3727
ts += inDefScopeBraces(makePackaging(start, pkg, topStatSeq()))
3727
- acceptStatSepUnlessAtEnd()
3728
- ts ++= topStatSeq()
3729
- }
3730
- else {
3728
+ continue = true
3729
+ else
3731
3730
acceptStatSep()
3732
3731
ts += makePackaging(start, pkg, topstats())
3733
- }
3734
3732
}
3735
- }
3733
+ if continue then
3734
+ acceptStatSepUnlessAtEnd()
3735
+ ts ++= topStatSeq()
3736
3736
}
3737
3737
else
3738
3738
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