Aladdin - Scala Bugtracking
[#177] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Matthias Philippe fixed 2003-10-06 11:40:34.0
subject Lifting local objects
code
class A {
  def foo = {
    object Y {
      def bar = 1;
    }
    Y.bar
  }
}
what happened
Compiler crashes:
Exception in thread "main" java.lang.AssertionError: A.foo.Y$0
        at scalac.symtab.Symbol.setOwner(Symbol.java:150)
        at scalac.symtab.TypeSymbol.setOwner(Symbol.java:1459)
        at scalac.transformer.LambdaLift.liftSymbol(LambdaLift.java:558)
        at scalac.transformer.LambdaLift.liftSymbol(LambdaLift.java:540)
        at scalac.transformer.LambdaLift.transform(LambdaLift.java:355)
        at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:41)
        at scalac.transformer.LambdaLift.transform(LambdaLift.java:396)
        at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:41)
        at scalac.transformer.OwnerTransformer.transformTemplateStat(OwnerTransformer.java:87)
        at scalac.transformer.OwnerTransformer.transformTemplateStats(OwnerTransformer.java:76)
        at scalac.transformer.LambdaLift.transformTemplateStats(LambdaLift.java:341)
        at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:68)
        at scalac.transformer.LambdaLift.transform(LambdaLift.java:373)
        at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:41)
        at scalac.transformer.OwnerTransformer.transformTemplateStat(OwnerTransformer.java:87)
        at scalac.transformer.OwnerTransformer.transformTemplateStats(OwnerTransformer.java:76)
        at scalac.transformer.LambdaLift.transformTemplateStats(LambdaLift.java:341)
        at scalac.transformer.LambdaLift.apply(LambdaLift.java:56)
        at scalac.transformer.LambdaLiftPhase.apply(LambdaLiftPhase.java:28)
        at scalac.Global.compile(Global.java:293)
        at scalac.Global.compile(Global.java:266)
        at scalac.Main.main(Main.java:32)
what expected No crash.
[back to overview]
Changes of this bug report
Philippe  edited on  2003-10-15 14:00:10.0

Added test in lambda lift to avoid duplicate owner update on module classes.