Skip to content

Scala 3 uses * as wildcard in imports #1956

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
Mar 16, 2021
Merged

Conversation

xhudik
Copy link
Contributor

@xhudik xhudik commented Mar 10, 2021

replaced _ with * in imports

Copy link
Contributor

@b-studios b-studios left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it, I was going to do that today :)

Could you maybe add a link to the reference?
https://dotty.epfl.ch/docs/reference/changed-features/imports.html

Also have you checked the rest of book and documents for imports?

I grepped for it and found old imports in the following files:

  • _overviews/scala3-macros/tutorial/quotes.md
  • _overviews/scala3-macros/tutorial/reflection.md
  • _overviews/scala3-book/domain-modeling-fp.md
  • _overviews/scala3-book/domain-modeling-oop.md
  • _overviews/scala3-book/interacting-with-java.md
  • _overviews/scala3-book/methods-main-methods.md
  • _overviews/scala3-book/packaging-imports.md
  • _overviews/scala3-book/scala-features.md
  • _overviews/scala3-book/scala-for-javascript-devs.md
  • _overviews/scala3-book/taste-modeling.md
  • _overviews/scala3-book/taste-objects.md
  • _overviews/scala3-book/taste-toplevel-definitions.md
  • _overviews/scala3-book/types-opaque-types.md

@b-studios
Copy link
Contributor

If you could apply the same changes also to the above files, I would be very happy. Otherwise, I can go ahead and do it.

@b-studios
Copy link
Contributor

b-studios commented Mar 15, 2021

Oh, I just noticed that you already have a PR addressing some of the above files (#1944). Thanks!
Would you mind addressing the rest in the same PR so we only have one atomic change?

@xhudik
Copy link
Contributor Author

xhudik commented Mar 15, 2021

Hi @b-studios (Jonathan :)) - yes, i did some changes as I read the book. And yes, I can take your list fix those that I had missed.

@b-studios b-studios added the scala-3 scala 3 documentation label Mar 15, 2021
@b-studios
Copy link
Contributor

Great, thanks! Can you add them to this PR so we have one big PR with all the related changes?

@xhudik
Copy link
Contributor Author

xhudik commented Mar 15, 2021

@b-studios - pls check it now

@@ -256,7 +254,7 @@ In the rare event there’s a naming conflict and you need to import something f
```
package accounts

import _root_.users._
import _root_.accounts.*
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

@b-studios b-studios merged commit 33ed63f into scala:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scala-3 scala 3 documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants