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

Differentiate Scala 2 and Scala 3 wildcard identifier names #9614

Merged
merged 1 commit into from May 10, 2021

Conversation

neko-kai
Copy link
Contributor

@neko-kai neko-kai commented May 6, 2021

This change names wildcards written with Scala 3 ? syntax with ?$N pattern instead of _$N used for Scala 2 wildcards

There are two reasons for it:

  • To allow kind-projector to implement Scala 3 underscore syntax for type lambdas by transforming old-style underscores, but leaving Scala 3 underscores intact
  • To show a mildly more relevant error message, since a wildcard introduced by ? will now also have a name with ? in the error message

See also:

This change names wildcards written with Scala 3 `?` syntax with `?$N` pattern instead of `_$N` used for Scala 2 wildcards

There are two reasons for it:

- To allow `kind-projector` to implement Scala 3 underscore syntax for type lambdas by transforming old-style underscores, but leaving Scala 3 underscores intact
- To show a mildly more relevant error message, since a wildcard introduced by `?` will now also have a name with `?` in the error message
@neko-kai
Copy link
Contributor Author

neko-kai commented May 7, 2021

This change is required together with #9605 to implement typelevel/kind-projector#188

@lrytz lrytz merged commit 5a04e29 into scala:2.13.x May 10, 2021
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label May 10, 2021
@lrytz lrytz removed the release-notes worth highlighting in next release notes label May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants