You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the -language:Scala2Compat option, Dotty will accept both the old and the new syntax. A migration warning will be emitted when the old syntax is encountered.
I am using Dotty "0.21.0-RC1" with this example with the old syntax:
objectExample {
List() match { caseList(_@_*) => }
List() match { caseList(_*) => }
}
Looks like:
old syntax compiles just fine, without any warnings, with and without-language:Scala2Compat flag (is the flag used by the compiler at all?)
adding -strict flag leads to compiler error The syntax '_*' is no longer supported; use 'x : _*' instead, while docs do not mention the flag (for example Pattern Bindings docs does mention -strict flag)
It would be nice to update the docs page to reflect the latest state of affairs.
Vararg Patterns Documentation says:
I am using Dotty "0.21.0-RC1" with this example with the old syntax:
Looks like:
-language:Scala2Compat
flag (is the flag used by the compiler at all?)-strict
flag leads to compiler errorThe syntax '_*' is no longer supported; use 'x : _*' instead
, while docs do not mention the flag (for example Pattern Bindings docs does mention-strict
flag)It would be nice to update the docs page to reflect the latest state of affairs.
related: Support changed Vararg Patterns
The text was updated successfully, but these errors were encountered: