diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-06-13 19:22:52 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-06-13 19:22:52 +0200 |
commit | f4d2678c42a82a2716eac8bc50e39a1d96fb67c0 (patch) | |
tree | dcc65a33356ac8c9f7acc79ca01170c5c55d402c | |
parent | fdca21eb130a782580cf13df0eb74eb4bceb2370 (diff) | |
download | scala-f4d2678c42a82a2716eac8bc50e39a1d96fb67c0.tar.gz scala-f4d2678c42a82a2716eac8bc50e39a1d96fb67c0.tar.bz2 scala-f4d2678c42a82a2716eac8bc50e39a1d96fb67c0.zip |
Don't require symbols to be loaded in the parser.
The parser special-cases primitive types. For comparing the name, it relied on having the symbols
for primitive types already loaded, which is not always the case. The presentation compiler
may parse sources for, say, scala.Int, and therefore the symbol for Int may not be yet available.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index fd154fe796..bce9f28847 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -253,7 +253,16 @@ self => final val InBlock = 1 final val InTemplate = 2 - lazy val ScalaValueClassNames = tpnme.AnyVal :: definitions.ScalaValueClasses.map(_.name) + lazy val ScalaValueClassNames = Seq(tpnme.AnyVal, + tpnme.Unit, + tpnme.Boolean, + tpnme.Byte, + tpnme.Short, + tpnme.Char, + tpnme.Int, + tpnme.Long, + tpnme.Float, + tpnme.Double) import nme.raw |