Aladdin - Scala Bugtracking
[#650] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-07-10 15:17:32.0
subject trait ambiguous inheritance crash
code
// util/LinkedList.scala
package util;
trait LinkedList;

// test/Test2.scala
package test;
import util._;
import scala.collection.mutable._;
trait Test2 extends LinkedList;


what happened
tsf-wpa-1-064:~/workspace/test/src mcdirmid$ ~/workspace/scala/build/quick/bin/scalac test/Test2.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.ast.TreeInfo.firstConstructor(TreeInfo.scala:116)
        at scala.tools.nsc.typechecker.Typers$Typer.parentTypes(Typers.scala:564)
        at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:388)
        at scala.tools.nsc.typechecker.Namers$Namer.classSig(Namers.scala:399)
        at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$typeSig(Namers.sca\
la:468)
        at scala.tools.nsc.typechecker.Namers$Namer$$anon$0.complete(Namers.scala:312)
        at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:346)
        at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:423)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1372)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1761)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1788)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$47.apply(Typers.scala:1005)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$47.apply(Typers.scala:995)
        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.List$.loop$0(List.scala:236)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:995)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1377)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1761)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1788)
        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:527)
        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)
tsf-wpa-1-064:~/workspace/test/src mcdirmid$ 
what expected
[back to overview]
Changes of this bug report
Martin  edited on  2006-07-10 19:47:41.0