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 specifies lazy variables as methods #8398

Closed
scabug opened this issue Mar 12, 2014 · 3 comments
Closed

Compiler specifies lazy variables as methods #8398

scabug opened this issue Mar 12, 2014 · 3 comments

Comments

@scabug
Copy link

scabug commented Mar 12, 2014

Using the scalac flag -Ywarn-unused produces the following error message on unused private lazy variables:

object Test {

  private lazy val bool = true

  def main(args: Array[String]) {
    println("stuff")
  }

}

$scalac -Ywarn-unused Test.scala
Test.scala:3: warning: private method in object Test is never used
  private lazy val bool = true
                   ^

I feel the error message should read "private val in object Test is never used"

@scabug
Copy link
Author

scabug commented Mar 12, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8398?orig=1
Reporter: Eric Hartsuyker (ehartsuyker)
Affected Versions: 2.11.0-M8

@scabug
Copy link
Author

scabug commented Aug 5, 2014

@gkossakowski said:
The 2.11.2 is out so I'm rescheduling the issue for 2.11.3.

@scabug scabug closed this as completed Sep 10, 2014
@scabug
Copy link
Author

scabug commented Sep 10, 2014

@gkossakowski said:
Fixed by scala/scala#3968

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

1 participant