diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 8 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/util/Position.scala | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 4f5be7cce0..ef9d678bd7 100755 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -2568,11 +2568,9 @@ self => ts.toList } val start = in.offset max 0 - atPos(start) { - topstats() match { - case List(stat @ PackageDef(_, _)) => stat - case stats => makePackaging(start, atPos(o2p(start)) { Ident(nme.EMPTY_PACKAGE_NAME) }, stats) - } + topstats() match { + case List(stat @ PackageDef(_, _)) => stat + case stats => makePackaging(start, atPos(o2p(start)) { Ident(nme.EMPTY_PACKAGE_NAME) }, stats) } } } diff --git a/src/compiler/scala/tools/nsc/util/Position.scala b/src/compiler/scala/tools/nsc/util/Position.scala index ff2be66702..c5ad63fe2f 100644 --- a/src/compiler/scala/tools/nsc/util/Position.scala +++ b/src/compiler/scala/tools/nsc/util/Position.scala @@ -11,7 +11,7 @@ package util object Position { val tabInc = 8 } -/** The class and its subclasses represent positions of ASTs and symbols. +/** The Position class and its subclasses represent positions of ASTs and symbols. * Except for NoPosition and FakePos, every position refers to a SourceFile * and to an offset in the sourcefile (its `point'). For batch compilation, * that's all. For interactive IDE's there are also RangePositions |