Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy val in local block crashes mixin with NPE #5796

Closed
scabug opened this issue May 13, 2012 · 3 comments
Closed

lazy val in local block crashes mixin with NPE #5796

scabug opened this issue May 13, 2012 · 3 comments

Comments

@scabug
Copy link

scabug commented May 13, 2012

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)
[...]
@scabug
Copy link
Author

scabug commented May 13, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5796?orig=1
Reporter: @lrytz
Blocks #5610

@scabug
Copy link
Author

scabug commented May 13, 2012

@paulp said:
Regressed somewhere among these commits, which is what you'd expect given the significant changes to lazy vals.

git log --no-merges --oneline aa555debf7..598e3f8586
454c2a0c77 GenASM activated via -target:jvm-1.6 or -target:jvm-1.5-asm
c5d9e88b89 Changes scala.math.signum to return negative zeros.
f9943432a6 glue ASM <-> GenASM, the only part of scala.tools.asm to maintain manually
df4df0ada2 subset of the ASM framework, re-namespaced as scala.tools.asm
07546bd803 compile Java files under src/compiler
d5fff51494 make strap build use exact same compiler options as quick build
3769f4dc10 Part IV of the Lazy Vals Saga: Optimized local vals. That's all folks.
76b6fd4e94 documentation about BasicBlock and Inliner
afa60fcc00 BytecodeWriters can do without the FJBG dependency
7d219774a6 Add test for t5564 in pending/pos
73fb63f115 overriding rather than pattern matching in icode.Opcodes
b7f92af64d Fixes SI-5344.
a3d4d17b77 Part III of the Lazy Vals Saga: Inliner strikes back. Or at least let's hope it will.
3631f1dadc Part II of the Lazy Vals Saga: Saving bitmap by the Three Musketeers: Byte, Int and Long. And Boolean (hey, he also deserves some credit!).
bdd9abedd8 Part I of the Lazy Vals Saga: Bitmaps are no longer inherited.

@scabug
Copy link
Author

scabug commented May 15, 2012

@hubertp said:
Fixed in efdac16e04bc1cd6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants