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 on a lazy val in a value class method #6358
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6358?orig=1 |
@jsuereth said: |
@retronym said: retronym/scala@2.10.x...ticket/6358 I'll add some more tests and submit a PR tomorrow. |
@retronym said: [scalacfork] no method allowed here: value indexfalse <method> <deferred> <local> <stable> <accessor> lazy <triedcooking> <latedeferred> <notprotected>
[scalacfork] at scala.Predef$.assert(Predef.scala:173)
[scalacfork] at scala.tools.nsc.Global.assert(Global.scala:238)
[scalacfork] at scala.tools.nsc.transform.Mixin$MixinTransformer.scala$tools$nsc$transform$Mixin$MixinTransformer$$postTransform(Mixin.scala:1216) |
@retronym said (edited on Sep 16, 2012 5:46:49 PM UTC): https://github.com/retronym/scala/compare/ticket/6358 Long story short:
My patch seems to work around this, but it isn't very appealing for the traversals like |
@harrah said: class Y[T](val i: Option[T]) extends AnyVal {
def q: List[T] = {
lazy val e: List[T] = i.toList
e
}
}
It works for a normal |
@odersky said: |
@odersky said: |
@hubertp said: |
@hubertp said: |
@hubertp said: |
@hubertp said: |
@jsuereth said: |
@hubertp said: |
@hubertp said: |
@hubertp said: |
@jsuereth said: Thanks for the reminder! This will be a good test of my git cherry-pick skills. |
@hubertp said: |
The text was updated successfully, but these errors were encountered: