diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-16 21:39:18 +0100 |
---|---|---|
committer | Tobias Schlatter <tobias@meisch.ch> | 2014-03-21 11:24:04 +0100 |
commit | 7bf837c79315e5db7e049f3ffeb6c6842d18880c (patch) | |
tree | fc74ac3f158adeba356fbca9d0d0df91d894c3d8 /src/dotty/tools | |
parent | 2c2ab10958e27ced276c9906f18a67c1eddd1928 (diff) | |
download | dotty-7bf837c79315e5db7e049f3ffeb6c6842d18880c.tar.gz dotty-7bf837c79315e5db7e049f3ffeb6c6842d18880c.tar.bz2 dotty-7bf837c79315e5db7e049f3ffeb6c6842d18880c.zip |
Fix of t0774: empty file
Was previously wrapped in a
package <empty>
but the resulting tree had no position, which caused a Typer assertion. If now
represented as EmptyTree.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index aea019bed..7bc7d5516 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -2071,6 +2071,7 @@ object Parsers { topstats() match { case List(stat @ PackageDef(_, _)) => stat + case Nil => EmptyTree // without this case we'd get package defs without positions case stats => PackageDef(Ident(nme.EMPTY_PACKAGE), stats) } } |