Aladdin - Scala Bugtracking
[#668] project: compiler priority: low category: bug
submitter assigned to status date submitted
Gilles Martin fixed 2006-07-20 19:09:04.0
subject Crash when extending without defining type parameters
code
class Test extends Iterable
what happened
test.scala:1 error: trait Iterable takes type parameters
class Test extends Iterable
                   ^
Exception in thread "main" java.lang.Error: head of empty list
        at scala.Predef$.error(Predef.scala:155)
        at scala.Nil$.head(List.scala:1062)
        at scala.Nil$.head(List.scala:1060)
        at scala.tools.nsc.typechecker.Typers$Typer.parentTypes(Typers.scala:538)
        at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:386)
        at scala.tools.nsc.typechecker.Namers$Namer.classSig(Namers.scala:397)
        at scala.tools.nsc.typechecker.Namers$Namer.liftedTry0$0(Namers.scala:465)
        at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$typeSig(Namers.sca\
la:461)
        at scala.tools.nsc.typechecker.Namers$Namer$$anon$0.complete(Namers.scala:310)
        at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:342)
        at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:415)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1263)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1600)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1626)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$43.apply(Typers.scala:955)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$43.apply(Typers.scala:945)
        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:945)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1268)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1600)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1626)
        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:213)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:202)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:202)
        at scala.Iterator$class.foreach(Iterator.scala:285)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:216)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:202)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:432)
        at scala.tools.nsc.Global$Run.compile(Global.scala:490)
        at scala.tools.nsc.Main$.process(Main.scala:60)
        at scala.tools.nsc.Main$.main(Main.scala:80)
        at scala.tools.nsc.Main.main(Main.scala)
what expected The error message without the crash
[back to overview]
Changes of this bug report
Gilles  edited on  2006-07-20 19:09:41.0
Martin  edited on  2006-07-24 17:58:02.0