Aladdin - Scala Bugtracking
[#697] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-08-14 11:39:08.0
subject compiler crash
code
object test {
  val x = 10 == 20 == 30 < 10;
}
what happened
Title: 

Exception in thread "main" java.lang.Error: value false is not an int
	at scala.tools.nsc.symtab.Constants$Constant.intValue(Constants.scala:116)
	at scala.tools.nsc.typechecker.ConstantFolder.scala$tools$nsc$typechecker$ConstantFolder$$foldBinop(ConstantFol\
der.scala:79)
	at scala.tools.nsc.typechecker.ConstantFolder$$anonfun$0.apply(ConstantFolder.scala:16)
	at scala.tools.nsc.typechecker.ConstantFolder$$anonfun$0.apply(ConstantFolder.scala:15)
	at scala.tools.nsc.typechecker.ConstantFolder.fold(ConstantFolder.scala:29)
	at scala.tools.nsc.typechecker.ConstantFolder.apply(ConstantFolder.scala:15)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply(Typers.scala:1081)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply(Typers.scala:1049)
	at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$0(Typers.scala:1220)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1640)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1764)
	at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:1801)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1693)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1764)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1629)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1764)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1791)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:1824)
	at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$typeSig(Namers.scala:486)\

	at scala.tools.nsc.typechecker.Namers$Namer$$anon$3.complete(Namers.scala:315)
	at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:346)
	at scala.tools.nsc.symtab.Symbols$Symbol.tpe(Symbols.scala:322)
	at scala.tools.nsc.ast.Trees$class.DefDef(Trees.scala:269)
	at scala.tools.nsc.Global.DefDef(Global.scala:32)
	at scala.tools.nsc.typechecker.Typers$Typer.addGetterSetter(Typers.scala:661)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$22.apply(Typers.scala:709)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$22.apply(Typers.scala:709)
	at scala.List.flatMap(List.scala:920)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:709)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:648)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1441)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1764)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1791)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:1004)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:994)
	at scala.List$.loop$0(List.scala:232)
	at scala.List$.mapConserve(List.scala:249)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:994)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1434)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1764)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1791)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:216)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:205)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:205)
	at scala.Iterator$class.foreach(Iterator.scala:304)
	at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:216)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:205)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:467)
	at scala.tools.nsc.Global$Run.compile(Global.scala:531)
	at scala.tools.nsc.Main$.process(Main.scala:76)
	at scala.tools.nsc.Main$.main(Main.scala:98)
	at scala.tools.nsc.Main.main(Main.scala)
what expected
[back to overview]
Changes of this bug report
Stephane  edited on  2006-08-15 15:26:14.0
value of x is 'true'