Aladdin - Scala Bugtracking
[#677] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Burak Martin fixed 2006-07-25 19:47:41.0
subject typer crash w/ head of empty list
code
object ga {
  val zx: All = {() => 4}
}
what happened
Burak-Emirs-MacBook-Pro:~/Documents/svn/scala buraq$ build/quick/bin/scalac -d /tmp /tmp/ga.scala 
Exception in thread "main" java.lang.Error: head of empty list
        at scala.Predef$.error(Predef.scala:166)
        at scala.Nil$.head(List.scala:1084)
        at scala.Nil$.head(List.scala:1082)
        at scala.tools.nsc.typechecker.Typers$Typer.typedFunction(Typers.scala:946)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1501)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1789)
        at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:1823)
        at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:721)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1438)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1785)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:998)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:988)
        at scala.List$.loop$0(List.scala:232)
        at scala.List$.mapConserve(List.scala:249)
        at scala.List$.loop$0(List.scala:236)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:988)
        at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:703)
        at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:642)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1435)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1785)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:998)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:988)
        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:988)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1428)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1785)
        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 guess.
[back to overview]
Changes of this bug report
Martin  edited on  2006-08-20 17:00:22.0