Compiler crashed with the following trace:
>scalac testi3.scala
exception when typing Box.unapply() ("anything")
exception when typing private val obj: java.lang.String = Box.unapply() ("anything")
exception when typing final class BoxTest extends java.lang.Object with scala.Ap
plication with scala.ScalaObject {
def this(): object BoxTest = {
BoxTest.super.this();
BoxTest.this./*Application$class*/$init$();
()
};
private val obj: java.lang.String = Box.unapply() ("anything");
def obj(): java.lang.String = BoxTest.this.obj;
{
var temp0: java.lang.String = BoxTest.this.obj();
{
var temp2: scala.Option = Box.unapply(temp0);
temp2.isEmpty().!().&&({
exit(scala.Console.println(temp2.get()));
true
})
};
throw new scala.MatchError(temp0);
exit(result){
result
}
}
}
exception when typing package {
final class Box extends java.lang.Object with scala.ScalaObject {
def this(): object Box = {
Box.super.this();
()
};
def unapply(x: java.lang.String): scala.Option = if (x.==("something"))
new scala.Some("yes")
else
scala.None
};
final class BoxTest extends java.lang.Object with scala.Application with scala
.ScalaObject {
def this(): object BoxTest = {
BoxTest.super.this();
BoxTest.this./*Application$class*/$init$();
()
};
private val obj: java.lang.String = Box.unapply()
("anything");
def obj(): java.lang.String = BoxTest.this.obj;
{
var temp0: java.lang.String = BoxTest.this.obj();
{
var temp2: scala.Option = Box.unapply(temp0);
temp2.isEmpty().!().&&({
exit(scala.Console.println(temp2.get()));
true
})
};
throw new scala.MatchError(temp0);
exit(result){
result
}
}
}
}
Exception in thread "main" java.lang.Error: unexpected tree: Box.unapply() ("anything")
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2212)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:473)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2232)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2276)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.sc
ala:2315)
at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:942
)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1845)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:473)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2232)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2265)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:129
6)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$51.apply(Typers.sca
la:1317)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$51.apply(Typers.sca
la:1317)
at scala.List$.loop$0(List.scala:243)
at scala.List$.mapConserve(List.scala:260)
at scala.List$.loop$0(List.scala:247)
at scala.List$.mapConserve(List.scala:260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1317
)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:9
20)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:8
25)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1839)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:473)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2232)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2265)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:129
6)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$51.apply(Typers.sca
la:1317)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$51.apply(Typers.sca
la:1317)
at scala.List$.loop$0(List.scala:243)
at scala.List$.mapConserve(List.scala:260)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1317
)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1835)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:473)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2232)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2265)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$26.appl
y(Erasure.scala:826)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$26.appl
y(Erasure.scala:823)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:77)
at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasur
e.scala:823)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1212)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:230)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:219)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:219)
at scala.Iterator$class.foreach(Iterator.scala:377)
at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:
244)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:219)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:484)
at scala.tools.nsc.Global$Run.compile(Global.scala:555)
at scala.tools.nsc.Main$.process(Main.scala:59)
at scala.tools.nsc.Main$.main(Main.scala:81)
at scala.tools.nsc.Main.main(Main.scala)
|