File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1858,14 +1858,16 @@ object Parsers {
1858
1858
// compatibility for Scala2 `x @ _*` syntax
1859
1859
infixPattern() match {
1860
1860
case pt @ Ident (tpnme.WILDCARD_STAR ) =>
1861
- migrationWarningOrError(" The syntax `x @ _*' is no longer supported; use `x : _*' instead" , startOffset(p))
1861
+ if (ctx.settings.strict.value)
1862
+ migrationWarningOrError(" The syntax `x @ _*' is no longer supported; use `x : _*' instead" , startOffset(p))
1862
1863
atSpan(startOffset(p), offset) { Typed (p, pt) }
1863
1864
case pt =>
1864
1865
atSpan(startOffset(p), 0 ) { Bind (name, pt) }
1865
1866
}
1866
1867
case p @ Ident (tpnme.WILDCARD_STAR ) =>
1867
1868
// compatibility for Scala2 `_*` syntax
1868
- migrationWarningOrError(" The syntax `_*' is no longer supported; use `x : _*' instead" , startOffset(p))
1869
+ if (ctx.settings.strict.value)
1870
+ migrationWarningOrError(" The syntax `_*' is no longer supported; use `x : _*' instead" , startOffset(p))
1869
1871
atSpan(startOffset(p)) { Typed (Ident (nme.WILDCARD ), p) }
1870
1872
case p =>
1871
1873
p
File renamed without changes.
You can’t perform that action at this time.
0 commit comments