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

isVar logic is wrong #6687

Closed
scabug opened this issue Nov 18, 2012 · 2 comments
Closed

isVar logic is wrong #6687

scabug opened this issue Nov 18, 2012 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Nov 18, 2012

It has to exclude .isLazy or you pick up unwanted hijackers. (This is what one reaps when reusing bits for ad-hoc encoding schemes.)

scala> import scala.reflect.runtime.universe._
import scala.reflect.runtime.universe._

scala> class A { lazy val x = 1 }
defined class A

scala> typeOf[A].members.toList filter (x => x.isTerm && x.asTerm.isVar)
res0: List[reflect.runtime.universe.Symbol] = List(lazy value x)
@scabug
Copy link
Author

@scabug scabug commented Nov 18, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6687?orig=1
Reporter: @paulp
Affected Versions: 2.10.0-RC2, 2.11.0-M1

Loading

@scabug
Copy link
Author

@scabug scabug commented Nov 24, 2012

Loading

@scabug scabug closed this Nov 25, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants