From f4d2678c42a82a2716eac8bc50e39a1d96fb67c0 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Wed, 13 Jun 2012 19:22:52 +0200 Subject: 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. --- src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/compiler') 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 -- cgit v1.2.3