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

Deprecation warnings for old syntax: _ type wildcards #18813

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Nov 1, 2023

Based on #18887
First part of #18869

  • In 3.4 we emit the deprecation warning and enable the patch with -rewrite.
  • In future we emit we make this syntax an error
//> using options -source future
def f: F[_] = ??? // error
//> using options -rewrite -source 3.4-migration
- def f: F[_] = ???
+ def f: F[?] = ???

@nicolasstucki nicolasstucki force-pushed the improve-migration-warning-for-type-wilcard-syntax branch 3 times, most recently from 6ca9de0 to a6d5ddd Compare November 1, 2023 15:16
@nicolasstucki nicolasstucki marked this pull request as ready for review November 2, 2023 12:51
@nicolasstucki nicolasstucki requested a review from odersky November 2, 2023 14:08
@nicolasstucki nicolasstucki removed the request for review from odersky November 7, 2023 09:38
@nicolasstucki nicolasstucki force-pushed the improve-migration-warning-for-type-wilcard-syntax branch from a6d5ddd to 7f26941 Compare November 7, 2023 09:40
@nicolasstucki nicolasstucki changed the title Disallow _ for wildcard arguments of types and use ? in future Deprecation warnings for old syntax: _ type wildcards Nov 7, 2023
@nicolasstucki nicolasstucki force-pushed the improve-migration-warning-for-type-wilcard-syntax branch from 7f26941 to b7d3167 Compare November 7, 2023 09:47
@nicolasstucki

This comment was marked as outdated.

@nicolasstucki nicolasstucki added this to the 3.4.0 milestone Nov 7, 2023
@nicolasstucki nicolasstucki added the release-notes Should be mentioned in the release notes label Nov 8, 2023
@nicolasstucki nicolasstucki force-pushed the improve-migration-warning-for-type-wilcard-syntax branch 6 times, most recently from 168e47a to 8063875 Compare November 13, 2023 09:09
* In `3.4` we emit the deprecation warning and enable the
  patch with `-rewrite`.
* In `future` we emit we make this syntax an error
@nicolasstucki nicolasstucki force-pushed the improve-migration-warning-for-type-wilcard-syntax branch from 8063875 to b822bd0 Compare November 13, 2023 10:27
@nicolasstucki nicolasstucki merged commit e3af2de into scala:main Nov 14, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes Should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants