Document migration to Scala 3 Underscore Type Lambdas syntax and cross-compiling with kind-projector#203
Conversation
…s-compiling with kind-projector
| To use underscores for type-lambdas in existing kind-projector enabled code, replace `*` or `?` type lambda placeholders with `_`. | ||
|
|
||
| In turn, you will also have to rewrite all usages of `_` as the wildcard to use `?` symbol. |
There was a problem hiding this comment.
In case are scalafix rules available for these rewrites, would be good to mention / link them.
There was a problem hiding this comment.
I don' think we have a Scalafix rule but we have a compiler rewrite with -source:future-migration -rewrite.
However, it also patches some other patterns that could break the compatibility with Scala 2.13. So I am not sure if it is worth mentioning.
I once did the inventory of the -source:future-migration rewrite rules but it has not been updated for some time: https://github.com/scalacenter/scala-3-migration-guide/tree/main/incompat-31
adpi2
left a comment
There was a problem hiding this comment.
@neko-kai Thanks a lot for this contribution!
The migration guide has been recently moved to https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html
So I will merge this, move it to docs.scala-lang and then deprecate this website.
Document new features implemented in scala/scala3#12378 scala/scala#9605 typelevel/kind-projector#188