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

2.11: -Xlint: in for comprehension, spurious "local val... is never used" warning #7712

Closed
scabug opened this issue Jul 31, 2013 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jul 31, 2013

% cat S.scala                                                        
object O {
  for {
    s <- Seq[String]()
    Seq(a) = s.toSeq
  } yield a
}
% /usr/local/scala-2.11.0-M4/bin/scalac -Xlint S.scala               
S.scala:4: warning: local val in value $anonfun is never used
    Seq(a) = s.toSeq
        ^
@scabug
Copy link
Author

scabug commented Jul 31, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7712?orig=1
Reporter: @SethTisue
Affected Versions: 2.11.0-M4
See #7707, #7711

@scabug
Copy link
Author

scabug commented Aug 1, 2013

@SethTisue said:
I'm getting a lot of spurious "unused" warnings with -Xlint and 2.11.0-M4. The details of what produces them are rather various. So far I've opened this ticket plus SI-7711 and SI-7707. I could open a few more with yet different details. Would it be better to keep opening separate tickets, or should we just have one meta-ticket that I add new and different test cases to as I discover them...?

@scabug
Copy link
Author

scabug commented Feb 17, 2014

@retronym said:
PR to disable unused warnings under Xlint: scala/scala#3544

Seth: its okay to add multiple issues, but please the same label to all of them (suggestion "unused-warning")

@scabug
Copy link
Author

scabug commented Feb 18, 2014

@SethTisue said:
awesome — thanks so much.

@scabug
Copy link
Author

scabug commented Jan 6, 2015

@som-snytt said:
Effective -Ywarn-unused per se is separate issue.

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

No branches or pull requests

2 participants