Open
Description
Compiler version
any
Minimized code
Split across 2 files:
A.scala:
package test
object A
// def a() = ??? // [1]
B.scala
package test
object B
def a() = ???
scalac will not show the issue - use scalacli with a build server (or another built tool):
- scala-cli A.scala B.scala
- uncomment [1]
- scala-cli A.scala B.scala
Output
no error, successful compilation
Expectation
Same error as when initially compiling A.scala and B.scala with uncommented [1], where we get:
[error] ./B.scala:4:1
[error] a is already defined as method a in /Users/jchyb/workspace/scala3/A.scala
[error]
[error] Note that overloaded methods must all be defined in the same group of toplevel definitions
[error] def a() = ???
[error] ^^^^^^^^^^^^^