bug icon indicating copy to clipboard operation
bug copied to clipboard

`Wildcard import cannot be renamed` error in REPL with given import

Open xuwei-k opened this issue 4 months ago • 1 comments

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

xuwei-k avatar Sep 26 '24 04:09 xuwei-k