Compiler version
d5fec8f
Minimized code
object $package:
def foo(x: Int): Unit = ???
object Foo:
val x = foo(1)
Output
Compiles
Expectation
It should not compile. At no point did I import the content of $package so that I can use it without the qualifier.
Notes
This probably has to do with the logic to handle top-level definitions since this the desugared version of:
def foo(x: Int): Unit = ???
object Foo:
val x = foo(1)