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

Wunused: Include import selector bounds in unused checks #17323

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

KacperFKorban
Copy link
Member

closes lampepfl#17314

@KacperFKorban KacperFKorban marked this pull request as ready for review April 21, 2023 19:52
Copy link
Contributor

@szymon-rd szymon-rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly it causes a new false positive in this snippet:

package foo:
  class Foo[T]
  given Foo[Int] = new Foo[Int]


package bar:
  import foo.{given foo.Foo[Int]}
  import foo.Foo

  val repro: Foo[Int] = summon[Foo[Int]]
-- Warning: Test.scala:7:14 ----------------------------------------------------
7 |  import foo.{given foo.Foo[Int]}
  |              ^^^^^^^^^^^^^^^^^^
  |              unused import
1 warning found

@szymon-rd szymon-rd added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Apr 26, 2023
@szymon-rd szymon-rd merged commit bae3a33 into scala:main Apr 26, 2023
@szymon-rd szymon-rd deleted the fix-i17314 branch April 26, 2023 11:38
@Kordyjan Kordyjan added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Apr 26, 2023
@Kordyjan Kordyjan added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels May 15, 2023
@Kordyjan Kordyjan added this to the 3.3.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.3.0-RC4 -Wunused:imports false positive for imports that are only used in imports
3 participants