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

Wildcard import cannot be renamed error in REPL with given import #13038

Open
xuwei-k opened this issue Sep 26, 2024 · 1 comment · May be fixed by scala/scala#10943
Open

Wildcard import cannot be renamed error in REPL with given import #13038

xuwei-k opened this issue Sep 26, 2024 · 1 comment · May be fixed by scala/scala#10943
Milestone

Comments

@xuwei-k
Copy link

xuwei-k commented Sep 26, 2024

Reproduction steps

Scala version: 2.13.15

$ scala -Xsource:3
Welcome to Scala 2.13.15 -Xsource:3.0.0 (OpenJDK 64-Bit Server VM, Java 21.0.4).
Type in expressions for evaluation. Or try :help.

scala> import Ordering.given
import Ordering.{_=>given}

scala> 2

       import Ordering.{_=>given}
                           ^
<synthetic>:2: error: Wildcard import cannot be renamed

(To diagnose errors in synthetic code, try adding `// show` to the end of your input.)
val res0: Int = 2

Problem

don't report error

@som-snytt
Copy link

It looks like the printer doesn't know how to print the import clause.

@lrytz lrytz added this to the 2.13.16 milestone Oct 9, 2024
@SethTisue SethTisue modified the milestones: 2.13.16, 2.13.17 Dec 13, 2024
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

Successfully merging a pull request may close this issue.

4 participants