Aladdin - Scala Bugtracking
[#1258] project: compiler priority: low category: bug
submitter assigned to status date submitted
Iulian Burak fixed 2007-08-08 10:28:21.0
subject [contrib #727] Another match block compiler crash
code
object Foo {
  case object baz
  def foo(bar : AnyRef) = {
    val Baz = baz
    bar match {
      case Baz => ()
    }
  }
}

// Note that "val Baz = baz" must be local to foo
what happened
java.lang.Error: Unknown type: (java.lang.Object)Unit
        at scala.tools.nsc.Global.abort(Global.scala:164)
        at scala.tools.nsc.backend.icode.TypeKinds$class.toTypeKind(TypeKinds.scala:438)
        at scala.tools.nsc.backend.icode.ICodes.toTypeKind(ICodes.scala:20)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:600)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadQualifier(GenICode.scala:1061)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:900)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genComparisonOp$0(GenICode.scala:1343)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genCond(GenICode.scala:1375)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:420)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:948)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:948)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:110)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
        at scala.List.foreach(List.scala:712)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:68)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:132)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:86)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
        at scala.List.foreach(List.scala:712)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:68)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:78)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:64)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:60)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:258)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:247)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:247)
        at scala.Iterator$class.foreach(Iterator.scala:375)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:255)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:247)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:53)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:542)
        at scala.tools.nsc.Global$Run.compile(Global.scala:623)
        at scala.tools.nsc.StandardCompileServer.session(CompileServer.scala:143)
        at scala.tools.util.SocketServer$$anonfun$0.apply(SocketServer.scala:69)
        at scala.tools.util.SocketServer$$anonfun$0.apply(SocketServer.scala:69)
        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:73)
        at scala.Console$.withOut(Console.scala:84)
        at scala.Console$.withOut(Console.scala:102)
        at scala.tools.util.SocketServer.run(SocketServer.scala:68)
        at scala.tools.nsc.StandardCompileServer.main(CompileServer.scala:185)
        at scala.tools.nsc.CompileServer.main(CompileServer.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at scala.tools.nsc.ObjectRunner$$anonfun$0.apply(ObjectRunner.scala:75)
        at scala.tools.nsc.ObjectRunner$.withContextClassLoader(ObjectRunner.scala:49)
        at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:74)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:154)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
error: fatal error (server aborted): Unknown type: (java.lang.Object)Unit
one error found
what expected No error.
[back to overview]
Changes of this bug report
Iulian  edited on  2007-08-08 10:28:45.0
Burak  edited on  2007-08-08 13:06:28.0