Closed
Description
Vararg Patterns Documentation says:
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:
object Example {
List() match { case List(_@_*) => }
List() match { case List(_*) => }
}
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 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
Metadata
Metadata
Assignees
Labels
No labels