Aladdin - Scala Bugtracking
[#645] project: compiler priority: low category: bug
submitter assigned to status date submitted
Burak _ fixed 2006-06-28 14:48:13.0
subject staging valdefs, cont'd.
code
object staging_test2 extends Application {
  import scala.reflect.Code;

  val x: Code[() => Int] = () => {
    var y = 1;
    y                // *
  }
  Console.println(x)
}
what happened
Exception in thread "main" java.lang.Error: symbol variable y does not exist in staging_test2.
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$\
genLoad(GenICode.scala:771)
        at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadArguments(GenICode.scala:938)
...
what expected later phases should not see any symbol for "y". The problem is reification of the Ident in line *, which is just wrong.
[back to overview]
Changes of this bug report
Burak  edited on  2006-06-28 15:01:50.0
was a matter of maintaining an environment of local reified symbols in LiftCode.