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

scala 2.12.4 false positive warning on unused private implicit val #10599

Closed
yanns opened this issue Nov 8, 2017 · 2 comments
Closed

scala 2.12.4 false positive warning on unused private implicit val #10599

yanns opened this issue Nov 8, 2017 · 2 comments

Comments

@yanns
Copy link

yanns commented Nov 8, 2017

Scala 2.12.4 emits a new warning (compared to scala 2.12.3) that is false-positive.

[warn] <path>/src/main/scala/Schema.scala:13:24: private val output in object Schema is never used
[warn]   private implicit val output = deriveObjectType[Ctx, Output]()
[warn]                        ^
[warn] one warning found

This appears with a implicit value used by code generated by a macro.

To reproduce the issue:
https://github.com/yanns/scala-2.14-unused-val

@hrhino
Copy link
Member

hrhino commented Nov 8, 2017

This appears to be the same as #10571; there's some discussion in that ticket.

@yanns
Copy link
Author

yanns commented Nov 8, 2017

Thanks for the info!!

Using -Ywarn-macros:after fixes the problem.

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

2 participants