Closed
Description
Compiler version
Scala 3.1.3
Scala 3.2.0-RC4
Minimized code
// Bar.scala
package io.foo
object Bar {
def baz: Int = 42
}
scalac Bar.scala
zip -r foo.jar io
scala -classpath foo.jar
scala> _root_.io.foo.Bar.baz
val res0: Int = 42
scala> io.foo.Bar.baz
-- [E008] Not Found Error: -------
1 |io.foo.Bar.baz
|^^^^^^
|value foo is not a member of io
1 error found
Expectation
The repl should resolve io.foo
without the _root_
prefix.
Initial analysis
scala.io
shadows io.foo
. Same goes for all scala.*
packages.
The above works fine in ammonite's scala3 repl as well as the default scala2 repl.