Skip to content

Fix #7137: Do not import Predef.any2stringadd by default #7164

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

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Sep 4, 2019

This changes the default root import from import scala.Predef._
to import scala.Predef.{ _, any2stringadd => _ }.

@nicolasstucki nicolasstucki self-assigned this Sep 4, 2019
@nicolasstucki nicolasstucki force-pushed the fix-#7137 branch 6 times, most recently from b7c4751 to a2903fa Compare September 4, 2019 13:33
@nicolasstucki nicolasstucki marked this pull request as ready for review September 4, 2019 14:08
@tu lazy val ScalaPredefModule: Symbol = ctx.requiredModule("scala.Predef")
@tu lazy val ScalaPredefModule: Symbol = {
val mod = ctx.requiredModule("scala.Predef")
mod.infoOrCompleter match {

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@smarter

This comment has been minimized.

@nicolasstucki

This comment has been minimized.

@nicolasstucki nicolasstucki force-pushed the fix-#7137 branch 3 times, most recently from 4279243 to 12882cc Compare September 11, 2019 13:21
This changes the default root import from `import scala.Predef._`
to `import scala.Predef.{ _, any2stringadd => _ }`.
@nicolasstucki nicolasstucki changed the title Fix #7137: Remove implicit modifier from Predef.any2stringadd Fix #7137: Do not import Predef.any2stringadd by default Sep 11, 2019
@nicolasstucki
Copy link
Contributor Author

Reimplemented. Now modifies the root import.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

// selectors: { _, any2stringadd => _ }
val selectors = untpd.Ident(nme.WILDCARD) ::
Thicket(untpd.Ident(nme.any2stringadd) :: untpd.Ident(nme.WILDCARD) :: Nil) ::
Nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Elegant 👍

@nicolasstucki nicolasstucki merged commit 1d84d3b into scala:master Sep 12, 2019
@nicolasstucki nicolasstucki deleted the fix-#7137 branch September 12, 2019 11:14
smarter added a commit to dotty-staging/dotty that referenced this pull request Sep 15, 2019
smarter added a commit that referenced this pull request Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants