Closed
Description
Issue
For the following compiler warning
[warn] -- Warning: /Users/jiahuitan/sbt-zinc-compilation-bug/src/main/scala/Foo.scala:1:6
[warn] 1 |trait Foo {
[warn] | ^
[warn] | trait Foo and object Foo produce classes that overwrite one another
[warn] one warning found
(Trait Foo
, Object Foo
are declared in different source file)
The fact that compilation succeeds is causing an infinite compilation bug in Zinc (sbt/zinc#1187).
Expected
Scala 2 throws error for such class file collision. Would it be possible for Dotty to have same behaviour as Scala 2 compiler?