twitter/rsc

Crash when parsing 0XFFFFFFFFL

Closed this issue · 0 comments

class C {
  def m: Long = 0XFFFFFFFFL
}
Test.scala:2: error: compiler crash: For input string: "0XFFFFFFFF"
  def m: Long = 0XFFFFFFFFL
                ^
java.lang.NumberFormatException: For input string: "0XFFFFFFFF"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Long.parseLong(Long.java:589)
	at java.lang.Long.parseUnsignedLong(Long.java:693)
	at rsc.parse.scala.Lits$class.literal(Lits.scala:36)
	at rsc.parse.scala.Lits$class.literal(Lits.scala:13)
	at rsc.parse.scala.Parser.literal(Parser.scala:13)
	at rsc.parse.scala.Terms$class.simpleTerm(Terms.scala:316)
	at rsc.parse.scala.Terms$class.prefixTerm(Terms.scala:239)
	at rsc.parse.scala.Terms$class.postfixTerm(Terms.scala:198)
	at rsc.parse.scala.Parser.postfixTerm(Parser.scala:13)
	at rsc.parse.scala.Terms$class.term1(Terms.scala:142)
	at rsc.parse.scala.Parser.term1(Parser.scala:13)
	at rsc.parse.scala.Terms$$anonfun$term$1.apply(Terms.scala:40)
	at rsc.parse.scala.Terms$$anonfun$term$1.apply(Terms.scala:38)
	at rsc.parse.scala.Wildcards$class.wrapEscapingTermWildcards(Wildcards.scala:56)
	at rsc.parse.scala.Parser.wrapEscapingTermWildcards(Parser.scala:13)
	at rsc.parse.scala.Terms$class.term(Terms.scala:38)
	at rsc.parse.scala.Parser.term(Parser.scala:13)
	at rsc.parse.scala.Defns$class.defnDef(Defns.scala:50)
	at rsc.parse.scala.Parser.defnDef(Parser.scala:13)
	at rsc.parse.scala.Templates$$anonfun$templateBraces$1$$anonfun$apply$1.apply(Templates.scala:154)
	at rsc.parse.scala.Templates$$anonfun$templateBraces$1$$anonfun$apply$1.apply(Templates.scala:92)
	at rsc.parse.scala.Helpers$class.inBraces(Helpers.scala:67)
	at rsc.parse.scala.Parser.inBraces(Parser.scala:13)
	at rsc.parse.scala.Templates$$anonfun$templateBraces$1.apply(Templates.scala:92)
	at rsc.parse.scala.Templates$$anonfun$templateBraces$1.apply(Templates.scala:89)
	at rsc.parse.scala.Wildcards$class.banEscapingWildcards(Wildcards.scala:18)
	at rsc.parse.scala.Parser.banEscapingWildcards(Parser.scala:13)
	at rsc.parse.scala.Templates$class.templateBraces(Templates.scala:89)
	at rsc.parse.scala.Templates$class.defnTemplate(Templates.scala:45)
	at rsc.parse.scala.Parser.defnTemplate(Parser.scala:13)
	at rsc.parse.scala.Defns$class.defnClass(Defns.scala:18)
	at rsc.parse.scala.Parser.defnClass(Parser.scala:13)
	at rsc.parse.scala.Sources$$anonfun$rsc$parse$scala$Sources$$packageStats$1.apply(Sources.scala:74)
	at rsc.parse.scala.Sources$$anonfun$rsc$parse$scala$Sources$$packageStats$1.apply(Sources.scala:53)
	at rsc.parse.scala.Wildcards$class.banEscapingWildcards(Wildcards.scala:18)
	at rsc.parse.scala.Parser.banEscapingWildcards(Parser.scala:13)
	at rsc.parse.scala.Sources$class.rsc$parse$scala$Sources$$packageStats(Sources.scala:53)
	at rsc.parse.scala.Sources$$anonfun$rsc$parse$scala$Sources$$sourceStats$1.apply(Sources.scala:48)
	at rsc.parse.scala.Sources$$anonfun$rsc$parse$scala$Sources$$sourceStats$1.apply(Sources.scala:18)
	at rsc.parse.scala.Wildcards$class.banEscapingWildcards(Wildcards.scala:18)
	at rsc.parse.scala.Parser.banEscapingWildcards(Parser.scala:13)
	at rsc.parse.scala.Sources$class.rsc$parse$scala$Sources$$sourceStats(Sources.scala:18)
	at rsc.parse.scala.Sources$class.source(Sources.scala:15)
	at rsc.parse.scala.Parser.source(Parser.scala:13)
	at rsc.parse.scala.Parser.parse(Parser.scala:42)
	at rsc.Compiler$$anonfun$rsc$Compiler$$parse$1.apply(Compiler.scala:89)
	at rsc.Compiler$$anonfun$rsc$Compiler$$parse$1.apply(Compiler.scala:78)
	at scala.collection.immutable.List.flatMap(List.scala:338)
	at rsc.Compiler.rsc$Compiler$$parse(Compiler.scala:78)
	at rsc.Compiler$$anonfun$phases$1.apply$mcV$sp(Compiler.scala:68)
	at rsc.Compiler$$anonfun$run$2.apply(Compiler.scala:36)
	at rsc.Compiler$$anonfun$run$2.apply(Compiler.scala:33)
	at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
	at rsc.Compiler.run(Compiler.scala:33)
	at rsc.cli.Main$.process(Main.scala:35)
	at rsc.cli.Main$.main(Main.scala:14)
	at rsc.cli.Main.main(Main.scala)