reproduction steps
Scala 2.13.7 and 3 differ as to whether these packagings are erroneous:
package _root_ {
class C {
val _root_ = 42
}
}
package _root_.p {
class C
}
Scala 2 is definitely wrong in rejecting _root_, as the spec is now clear that only the selection _root_.x makes _root_ mean the root package.
Once _root_ is defined, possibly the second packaging should put p.C in it. Scala 2 warns about such a case:
// neg/t6217c.scala
package a {
package _root_ {
object X
}
package _root_.p {
object Y
}
}
Scala 3 compiles the first example but not the second.
problem
The versions ought to agree.