Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Scala 3: * is replaced by _ when together with given #221

Open
gvolpe opened this issue Oct 5, 2021 · 4 comments
Open

Scala 3: * is replaced by _ when together with given #221

gvolpe opened this issue Oct 5, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@gvolpe
Copy link

gvolpe commented Oct 5, 2021

When importing package.{given, *}, the * is replaced by _, leading to compilation errors. E.g.

-import foo.domain.{ given, * }
+import foo.domain.{_, given}

This happens using the latest snapshot: 0.5.0+42-7e4a4f8a-SNAPSHOT.

@FlorianCassayre
Copy link

In particular this leads to compilation error if the compiler flag -source:future is set. In any case, one would expect organize-imports to rewrite _ by * since the former is deprecated.

@kasiaMarek
Copy link

This seems to be fixed on master, @liancheng will you be releasing a new version (so we can have the fix in metals)?

@bjaglin
Copy link
Contributor

bjaglin commented Jun 4, 2023

Scalafix 0.11.0 is out with OrganizeImports built-in, and does contain the fix.

@bjaglin
Copy link
Contributor

bjaglin commented Jun 4, 2023

(assuming this is a duplicate of #279, but it does look like it)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants