Aladdin - Scala Bugtracking
[#1284] project: compiler priority: high category: bug
submitter assigned to status date submitted
Philipp Martin fixed 2007-08-21 15:57:32.0
subject parameterized super call crashes compiler
code
object superCrash {
  trait Actor {
    def receive[R](fun: R) = {
      println(fun)
    }
  }

  trait JoinActor extends Actor {
    override def receive[R](fun: R): Unit = {
      super.receive(fun) // crashes the compiler
    }
  }
}
what happened
Exception in thread "main" java.lang.Error: no-symbol does not have owner
        at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:1419)
        at scala.tools.nsc.symtab.Symbols$Symbol.isLocal(Symbols.scala:304)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:840)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$28.apply(Trees.scala:1313)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$28.apply(Trees.scala:1313)
        at scala.List$.loop$0(List.scala:244)
        at scala.List$.mapConserve(List.scala:261)
        at scala.tools.nsc.ast.Trees$Transformer.transformTypeDefs(Trees.scala:1313)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1222)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1221)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1333)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1220)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:836)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:681)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:588)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:588)
...
what expected Compile without error.
[back to overview]
Changes of this bug report
Martin  edited on  2007-08-21 17:36:36.0