@@ -439,7 +439,7 @@ object Parsers {
439
439
case t : Typed =>
440
440
report.errorOrMigrationWarning(
441
441
em " parentheses are required around the parameter of a lambda ${rewriteNotice()}" ,
442
- in.sourcePos())
442
+ in.sourcePos(), from = `3.0` )
443
443
if migrateTo3 then
444
444
patch(source, t.span.startPos, " (" )
445
445
patch(source, t.span.endPos, " )" )
@@ -1180,7 +1180,7 @@ object Parsers {
1180
1180
|or enclose in braces '{ $name} if you want a quoted expression.
1181
1181
|For now, you can also `import language.deprecated.symbolLiterals` to accept
1182
1182
|the idiom, but this possibility might no longer be available in the future. """ ,
1183
- in.sourcePos())
1183
+ in.sourcePos(), from = `3.0` )
1184
1184
if migrateTo3 then
1185
1185
patch(source, Span (in.offset, in.offset + 1 ), " Symbol(\" " )
1186
1186
patch(source, Span (in.charOffset - 1 ), " \" )" )
@@ -1272,7 +1272,7 @@ object Parsers {
1272
1272
i """ This opening brace will start a new statement in Scala 3.
1273
1273
|It needs to be indented to the right to keep being treated as
1274
1274
|an argument to the previous expression. ${rewriteNotice()}""" ,
1275
- in.sourcePos())
1275
+ in.sourcePos(), from = `3.0` )
1276
1276
patch(source, Span (in.offset), " " )
1277
1277
1278
1278
def possibleTemplateStart (isNew : Boolean = false ): Unit =
@@ -1826,7 +1826,7 @@ object Parsers {
1826
1826
else if in.token == VIEWBOUND then
1827
1827
report.errorOrMigrationWarning(
1828
1828
" view bounds `<%' are no longer supported, use a context bound `:' instead" ,
1829
- in.sourcePos())
1829
+ in.sourcePos(), from = `3.0` )
1830
1830
atSpan(in.skipToken()) {
1831
1831
Function (Ident (pname) :: Nil , toplevelTyp())
1832
1832
} :: contextBounds(pname)
@@ -1976,7 +1976,7 @@ object Parsers {
1976
1976
report.errorOrMigrationWarning(
1977
1977
i """ `do <body> while <cond>` is no longer supported,
1978
1978
|use `while <body> ; <cond> do ()` instead. ${rewriteNotice()}""" ,
1979
- in.sourcePos())
1979
+ in.sourcePos(), from = `3.0` )
1980
1980
val start = in.skipToken()
1981
1981
atSpan(start) {
1982
1982
val body = expr()
@@ -2096,7 +2096,7 @@ object Parsers {
2096
2096
report.errorOrMigrationWarning(
2097
2097
em """ `_*` can be used only for last argument of method application.
2098
2098
|It is no longer allowed in operands of infix operations. """ ,
2099
- in.sourcePos(uscoreStart))
2099
+ in.sourcePos(uscoreStart), from = `3.0` )
2100
2100
else
2101
2101
syntaxError(SeqWildcardPatternPos (), uscoreStart)
2102
2102
Typed (t, atSpan(uscoreStart) { Ident (tpnme.WILDCARD_STAR ) })
@@ -3347,7 +3347,7 @@ object Parsers {
3347
3347
if migrateTo3 then
3348
3348
report.errorOrMigrationWarning(
3349
3349
s " Procedure syntax no longer supported; ` $toInsert` should be inserted here " ,
3350
- in.sourcePos())
3350
+ in.sourcePos(), from = `3.0` )
3351
3351
patch(source, Span (in.lastOffset), toInsert)
3352
3352
true
3353
3353
else
@@ -3756,7 +3756,7 @@ object Parsers {
3756
3756
if (in.token == LBRACE || in.token == COLONEOL ) {
3757
3757
report.errorOrMigrationWarning(
3758
3758
" `extends` must be followed by at least one parent" ,
3759
- in.sourcePos())
3759
+ in.sourcePos(), from = `3.0` )
3760
3760
Nil
3761
3761
}
3762
3762
else constrApps()
0 commit comments