Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5796

lazy val in local block crashes mixin with NPE

    Details

      Description

      Regression, worked with 2.10.0-20120425-140228-8f3f0724f9, fails with current master (I don't know when it started failing)

      compiling

      object Bug {
        def foo() {
          val v = {
            lazy val s = 0
            s
          }
        }
      }
      

      crashes with

      Exception in thread "main" java.lang.NullPointerException
      	at scala.tools.nsc.transform.Mixin$MixinTransformer.scala$tools$nsc$transform$Mixin$MixinTransformer$$postTransform(Mixin.scala:1139)
      	at scala.tools.nsc.transform.Mixin$MixinTransformer$$anonfun$transform$1.apply(Mixin.scala:1248)
      	at scala.tools.nsc.transform.Mixin$MixinTransformer$$anonfun$transform$1.apply(Mixin.scala:1248)
      	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:187)
      	at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:196)
      	at scala.tools.nsc.Global.afterMixin(Global.scala:947)
      	at scala.tools.nsc.transform.Mixin$MixinTransformer.transform(Mixin.scala:1248)
      [...]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                plocinic Hubert Plociniczak
                Reporter:
                rytz Lukas Rytz
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: