Skip to content

Regression in armanbilge/gcp4s, unallow _root_ selector #18275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WojciechMazur opened this issue Jul 24, 2023 · 0 comments · Fixed by #18335
Closed

Regression in armanbilge/gcp4s, unallow _root_ selector #18275

WojciechMazur opened this issue Jul 24, 2023 · 0 comments · Fixed by #18335
Assignees
Labels
area:parser itype:bug regression This worked in a previous version but doesn't anymore

Comments

@WojciechMazur
Copy link
Contributor

WojciechMazur commented Jul 24, 2023

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
@WojciechMazur WojciechMazur added itype:bug area:parser regression This worked in a previous version but doesn't anymore labels Jul 24, 2023
@dwijnand dwijnand linked a pull request Aug 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:parser itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants