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

Compiler crashes with lazy val nested in value class method #6361

Closed
scabug opened this issue Sep 11, 2012 · 2 comments
Closed

Compiler crashes with lazy val nested in value class method #6361

scabug opened this issue Sep 11, 2012 · 2 comments

Comments

@scabug
Copy link

scabug commented Sep 11, 2012

class M(val t: Int) extends AnyVal {
   def lazyString = {
      lazy val Foo = "!"

      () => {Foo}
   }
}
ypeRef(TypeSymbol(class VolatileByteRef extends Serializable))

uncaught exception during compilation: java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Could not find proxy for lazy var Foo$lzy: String in List(lazy value Foo$lzy, method extension$lazyString, object M, object $iw, object $iw, object $read, package $line5, package <root>) (currentOwner= value Foo$lzycompute$1 )
	at scala.tools.nsc.transform.LambdaLift$LambdaLifter.scala$tools$nsc$transform$LambdaLift$LambdaLifter$$searchIn$1(LambdaLift.scala:303)
	at scala.tools.nsc.transform.LambdaLift$LambdaLifter$$anonfun$scala$tools$nsc$transform$LambdaLift$LambdaLifter$$searchIn$1$2.apply(LambdaLift.scala:308)
	at scala.tools.nsc.transform.LambdaLift$LambdaLifter$$anonfun$scala$tools$nsc$transform$LambdaLift$LambdaLifter$$searchIn$1$2.apply(LambdaLift.scala:308)
	at scala.Option.getOrElse(Option.scala:120)
@scabug
Copy link
Author

scabug commented Sep 11, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6361?orig=1
Reporter: @retronym
Affected Versions: 2.10.0-M7
Clones #6359
Duplicates #6358

@scabug
Copy link
Author

scabug commented Sep 11, 2012

@retronym said:
#6358

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