Note: this is kind of a stress test, but I run into this bug enough that it would be really nice to fix. Run the\
resident compiler and compile Good.scala and Bad.scala an equal number of times for a total of 12 where Bad.sca\
la should be the 12th file compiled. The 13th file compiled should be Good.scala. Tran5cr1p7-haX0Rs as follows. First \
the one-one alternating version:
sean-mcdirmid:~/workspace/test34/src mcdirmid$ ../../scala/build/quick/bin/scalac -resident -d ../bin/ -sou\
rcepath .
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
Exception in thread "main" java.lang.Error: recursive <:<
at scala.tools.nsc.symtab.Types$class.isSubType(Types.scala:1823)
at scala.tools.nsc.symtab.SymbolTable.isSubType(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$Type.$less$colon$less(Types.scala:266)
at scala.tools.nsc.symtab.Types$class.isSubType0(Types.scala:1875)
at scala.tools.nsc.symtab.SymbolTable.isSubType0(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$class.isSubType(Types.scala:1824)
at scala.tools.nsc.symtab.SymbolTable.isSubType(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$Type.$less$colon$less(Types.scala:266)
at scala.tools.nsc.typechecker.Typers$Typer.typedAbsTypeDef(Typers.scala:1073)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1863)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1270)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.List$.loop$0(List.scala:244)
at scala.List$.mapConserve(List.scala:261)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:917)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:827)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1851)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1270)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.List$.loop$0(List.scala:244)
at scala.List$.mapConserve(List.scala:261)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1847)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:220)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
at scala.Iterator$class.foreach(Iterator.scala:341)
at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:244)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:209)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:474)
at scala.tools.nsc.Global$Run.compile(Global.scala:543)
at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:37)
at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:34)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:17)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.Main$.resident(Main.scala:34)
at scala.tools.nsc.Main$.process(Main.scala:69)
at scala.tools.nsc.Main$.main(Main.scala:96)
at scala.tools.nsc.Main.main(Main.scala)
sean-mcdirmid:~/workspace/test34/src mcdirmid$
And now the three-three alternating version:
sean-mcdirmid:~/workspace/test34/src mcdirmid$ ../../scala/build/quick/bin/scalac -resident -d ../bin/ -sou\
rcepath .
nsc> test/Good.scala
nsc> test/Good.scala
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
nsc> test/Good.scala
nsc> test/Good.scala
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Bad.scala
test/Bad.scala:7 error: illegal cyclic reference involving trait NodeImpl
type Node <: NodeImpl;
^
test/Bad.scala:9 error: illegal cyclic reference involving trait NodeImplB
trait NodeImplB extends NodeImpl;
^
test/Bad.scala:10 error: illegal cyclic reference involving trait NodeImpl
trait NodeImpl extends NodeImplA with NodeImplB;
^
nsc> test/Good.scala
Exception in thread "main" java.lang.Error: recursive <:<
at scala.tools.nsc.symtab.Types$class.isSubType(Types.scala:1823)
at scala.tools.nsc.symtab.SymbolTable.isSubType(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$Type.$less$colon$less(Types.scala:266)
at scala.tools.nsc.symtab.Types$class.isSubType0(Types.scala:1875)
at scala.tools.nsc.symtab.SymbolTable.isSubType0(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$class.isSubType(Types.scala:1824)
at scala.tools.nsc.symtab.SymbolTable.isSubType(SymbolTable.scala:10)
at scala.tools.nsc.symtab.Types$Type.$less$colon$less(Types.scala:266)
at scala.tools.nsc.typechecker.Typers$Typer.typedAbsTypeDef(Typers.scala:1073)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1863)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1270)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.List$.loop$0(List.scala:244)
at scala.List$.mapConserve(List.scala:261)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:917)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:827)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1851)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1270)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1291)
at scala.List$.loop$0(List.scala:244)
at scala.List$.mapConserve(List.scala:261)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1291)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1847)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2228)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2260)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:220)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
at scala.Iterator$class.foreach(Iterator.scala:341)
at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:244)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:209)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:474)
at scala.tools.nsc.Global$Run.compile(Global.scala:543)
at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:37)
at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:34)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:17)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
at scala.tools.nsc.Main$.loop(Main.scala:17)
at scala.tools.nsc.Main$.resident(Main.scala:34)
at scala.tools.nsc.Main$.process(Main.scala:69)
at scala.tools.nsc.Main$.main(Main.scala:96)
at scala.tools.nsc.Main.main(Main.scala)
sean-mcdirmid:~/workspace/test34/src mcdirmid$
Same crash. Really cool that the compiler will always crash on run 13, at least that is deterministic!
|