Skip to content

Regression in armanbilge/gcp4s, unallow _root_ selector #18275

Closed
@WojciechMazur

Description

@WojciechMazur

Compiler version

Works in 3.3.1-RC4
Fails in 3.3.2-RC nightly
Bisect points to: 8be509f #18187

Minimized code

package foo

enum MyEnum derives _root_.foo.Eq:
  case One

trait Eq[T]
object Eq:
  inline def derived[T](using m: scala.deriving.Mirror.Of[T]): Eq[T] = ???

Output

-- Error: /Users/wmazur/projects/dotty/bisect/main.scala:3:26 ------------------
3 |enum MyEnum derives _root_.foo.Eq:
  |                          ^
  |                          Illegal use of root package name.
1 error found

Expectation

Should allow to use _root_ in fully qualified type name, becouse of all this cases are allowed:

import _root_.scala.StringContext // ok
class Test :
    val x = new _root_.scala.StringContext() // ok
    val y: Option[_root_.scala.Serializable] = None // ok
    val z: _root_.scala.None.type = None
    val w = _root_.scala.None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions