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

-Ywarn-unused: warning: local val in method reifyAnnotationInfo is never used #8915

Closed
scabug opened this Issue Oct 15, 2014 · 2 comments

Comments

Projects
None yet
1 participant
@scabug
Copy link

scabug commented Oct 15, 2014

Code: https://github.com/scala/scala/blob/0268e03cb461b0c7e8ae2082894988395fc0994a/src/compiler/scala/reflect/reify/codegen/GenAnnotationInfos.scala#L13

Because the name of the val is sadly not mentioned, I can't really figure out whether it's caused by some synthetic val generated by the compiler, or by a bug which misses the usage of "arg" inside the try (if the warning is about "arg").

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Oct 15, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8915?orig=1
Reporter: @soc
Affected Versions: 2.11.2
See #8040, #7707, #7711, #7712

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Sep 13, 2016

@som-snytt said (edited on Sep 15, 2016 3:48:52 PM UTC):
reifiedArgs is not used. But the scary comments inviting me to "take a look inside" deterred me from looking further.

Possibly,

val reifiedArgs = ann.args.map(f)
//should be
ann.args.foreach(f)

The PR for #8040 adds names to the messages and amends this example.

@scabug scabug closed this Sep 13, 2016

@scabug scabug added the lint label Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.