Scala Programming Language
  1. Scala Programming Language
  2. SI-5162

"Unexpected tree in genLoad" when compiling a derived actor

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.1, Scala 2.9.2
    • Fix Version/s: Scala 2.10.0-M3, Scala 2.10.0
    • Component/s: Misc Compiler
    • Labels:
      None
    • Environment:

      Scala 2.9.1 and Scala 2.9.2.r25900-b20111028045827

      Description

      Compiling this

      abstract class DerivedActor extends scala.actors.Actor {
      	override def !? (msg: Any): Any = { super.!?(msg) }
      }
      

      results in a java.lang.Error: Unexpected tree in genLoad: DerivedActor.super/class error:

      >scalac -d out src/Bugreport.scala
      error: java.lang.Error: Unexpected tree in genLoad: DerivedActor.super/class scala.reflect.generic.Trees$Super at: source-src\Bugreport.scala,line-2,offset=95
              at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:34)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:1126)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadQualifier(GenICode.scala:1175)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:738)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadQualifier(GenICode.scala:1175)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:921)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:114)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:69)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:69)
              at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
              at scala.collection.immutable.List.foreach(List.scala:45)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:69)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:136)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:88)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:69)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:69)
              at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
              at scala.collection.immutable.List.foreach(List.scala:45)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:69)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:79)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:65)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:61)
              at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
              at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
              at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
              at scala.collection.Iterator$class.foreach(Iterator.scala:660)
              at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
              at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
              at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:54)
              at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
              at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
              at scala.tools.nsc.Main$.process(Main.scala:106)
              at scala.tools.nsc.Main$.main(Main.scala:123)
              at scala.tools.nsc.Main.main(Main.scala)
      

        Activity

        Hide
        Paul Phillips added a comment -

        Regressed in r24749, intended to fix SI-4283.

        Show
        Paul Phillips added a comment - Regressed in r24749, intended to fix SI-4283 .
        Hide
        Paul Phillips added a comment -

        It's some kind of unexpectedly casted Super tree showing up in icode.

        Show
        Paul Phillips added a comment - It's some kind of unexpectedly casted Super tree showing up in icode.
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/699
        Show
        Jason Zaugg added a comment - Fixed in https://github.com/scala/scala/commit/0a07bb962f87053e217dc34b88f5e46e046bd95a

          People

          • Assignee:
            Jason Zaugg
            Reporter:
            Georg Dietrich
          • Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development