Skip to content
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

Allow renaming imports from _root_ #9482

Merged
merged 2 commits into from Mar 10, 2021
Merged

Allow renaming imports from _root_ #9482

merged 2 commits into from Mar 10, 2021

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Feb 3, 2021

Allow import _root_.{x => y}

Fixes scala/bug#9125

@scala-jenkins scala-jenkins added this to the 2.13.5 milestone Feb 3, 2021
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Jasper mentions this guard exists due to scala/bug#283 in 4e45e9e without a test case. Could you add that test case now so we don't accidentally regress on that, please?

@som-snytt
Copy link
Contributor Author

@dwijnand Do you mean import _root_._ as opposed to _root_.p?

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Feb 3, 2021
@dwijnand
Copy link
Member

dwijnand commented Feb 3, 2021

I'm not sure if it's just that or that + the use of a static method. So just the test case as it is in the ticket, IMO.

@som-snytt
Copy link
Contributor Author

som-snytt commented Feb 3, 2021

It's charming how back then sometimes they used parens and sometimes not.

Fixing a 3-digit ticket is pretty cool, but adding a 3-digit test case is a close second.

@SethTisue SethTisue modified the milestones: 2.13.5, 2.13.6 Feb 9, 2021
@SethTisue
Copy link
Member

@lrytz final review/merge?

@SethTisue
Copy link
Member

@som-snytt is there anything in the spec about this?

@som-snytt
Copy link
Contributor Author

Spec 9.4 doesn't mention the previous limitation.

@lrytz lrytz merged commit b9479cc into scala:2.13.x Mar 10, 2021
@som-snytt som-snytt deleted the issue/9125 branch March 10, 2021 09:57
@lrytz lrytz changed the title Import from _root_ Allow renaming imports from _root_ May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
5 participants