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

Deprecate calling a type ? without backticks #9626

Merged
merged 1 commit into from May 11, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented May 10, 2021

#9560 introduced a new meaning for
? under -Xsource:3, but to smooth out the migration it'd be nice if
we could also enable this meaning by default. Before doing so, let's
deprecate any current usage of ? as a type that isn't wrapped in
backticks.

@scala-jenkins scala-jenkins added this to the 2.13.7 milestone May 10, 2021
@smarter smarter force-pushed the deprecate-qmark branch 2 times, most recently from c8354f4 to 38791f5 Compare May 10, 2021 22:05
@smarter
Copy link
Member Author

smarter commented May 10, 2021

(I think it'd be nice to have this in 2.13.6, no pressure though :)).

@SethTisue SethTisue modified the milestones: 2.13.7, 2.13.6 May 11, 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.

SGTM

scala#9560 introduced a new meaning for
`?` under `-Xsource:3`, but to smooth out the migration it'd be nice if
we could also enable this meaning by default. Before doing so, let's
deprecate any current usage of `?` as a type that isn't wrapped in
backticks.
@lrytz lrytz enabled auto-merge May 11, 2021 08:32
@lrytz lrytz merged commit 628d022 into scala:2.13.x May 11, 2021
smarter added a commit to smarter/scala that referenced this pull request Apr 5, 2022
Like scala#9721, the goal here is to ease
cross-compilation between Scala 2 and 3 code as we prepare for `_` as wildcard
to be deprecated in Scala 3 (cf scala/scala3#5379).

This is technically a source-breaking change, but using a type named ? without
backticks is deprecated since 2.13.6 (scala#9626) and defining a type named ? without
backticks is disallowed since 2.13.7 (scala#9735). The only known user of ? as a type
name was the kind-projector plugin, but support for this syntax was removed from
the plugin a year ago (typelevel/kind-projector#186),
so I believe this change won't be disruptive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants