@@ -439,7 +439,7 @@ object Parsers {
439439 case t : Typed =>
440440 report.errorOrMigrationWarning(
441441 em " parentheses are required around the parameter of a lambda ${rewriteNotice()}" ,
442- in.sourcePos())
442+ in.sourcePos(), from = `3.0` )
443443 if migrateTo3 then
444444 patch(source, t.span.startPos, " (" )
445445 patch(source, t.span.endPos, " )" )
@@ -1180,7 +1180,7 @@ object Parsers {
11801180 |or enclose in braces '{ $name} if you want a quoted expression.
11811181 |For now, you can also `import language.deprecated.symbolLiterals` to accept
11821182 |the idiom, but this possibility might no longer be available in the future. """ ,
1183- in.sourcePos())
1183+ in.sourcePos(), from = `3.0` )
11841184 if migrateTo3 then
11851185 patch(source, Span (in.offset, in.offset + 1 ), " Symbol(\" " )
11861186 patch(source, Span (in.charOffset - 1 ), " \" )" )
@@ -1272,7 +1272,7 @@ object Parsers {
12721272 i """ This opening brace will start a new statement in Scala 3.
12731273 |It needs to be indented to the right to keep being treated as
12741274 |an argument to the previous expression. ${rewriteNotice()}""" ,
1275- in.sourcePos())
1275+ in.sourcePos(), from = `3.0` )
12761276 patch(source, Span (in.offset), " " )
12771277
12781278 def possibleTemplateStart (isNew : Boolean = false ): Unit =
@@ -1826,7 +1826,7 @@ object Parsers {
18261826 else if in.token == VIEWBOUND then
18271827 report.errorOrMigrationWarning(
18281828 " view bounds `<%' are no longer supported, use a context bound `:' instead" ,
1829- in.sourcePos())
1829+ in.sourcePos(), from = `3.0` )
18301830 atSpan(in.skipToken()) {
18311831 Function (Ident (pname) :: Nil , toplevelTyp())
18321832 } :: contextBounds(pname)
@@ -1976,7 +1976,7 @@ object Parsers {
19761976 report.errorOrMigrationWarning(
19771977 i """ `do <body> while <cond>` is no longer supported,
19781978 |use `while <body> ; <cond> do ()` instead. ${rewriteNotice()}""" ,
1979- in.sourcePos())
1979+ in.sourcePos(), from = `3.0` )
19801980 val start = in.skipToken()
19811981 atSpan(start) {
19821982 val body = expr()
@@ -2096,7 +2096,7 @@ object Parsers {
20962096 report.errorOrMigrationWarning(
20972097 em """ `_*` can be used only for last argument of method application.
20982098 |It is no longer allowed in operands of infix operations. """ ,
2099- in.sourcePos(uscoreStart))
2099+ in.sourcePos(uscoreStart), from = `3.0` )
21002100 else
21012101 syntaxError(SeqWildcardPatternPos (), uscoreStart)
21022102 Typed (t, atSpan(uscoreStart) { Ident (tpnme.WILDCARD_STAR ) })
@@ -3347,7 +3347,7 @@ object Parsers {
33473347 if migrateTo3 then
33483348 report.errorOrMigrationWarning(
33493349 s " Procedure syntax no longer supported; ` $toInsert` should be inserted here " ,
3350- in.sourcePos())
3350+ in.sourcePos(), from = `3.0` )
33513351 patch(source, Span (in.lastOffset), toInsert)
33523352 true
33533353 else
@@ -3756,7 +3756,7 @@ object Parsers {
37563756 if (in.token == LBRACE || in.token == COLONEOL ) {
37573757 report.errorOrMigrationWarning(
37583758 " `extends` must be followed by at least one parent" ,
3759- in.sourcePos())
3759+ in.sourcePos(), from = `3.0` )
37603760 Nil
37613761 }
37623762 else constrApps()
0 commit comments