File tree 5 files changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/reporting
5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3362,7 +3362,7 @@ end QuotedTypeMissing
3362
3362
3363
3363
final class DeprecatedAssignmentSyntax (key : Name , value : untpd.Tree )(using Context ) extends SyntaxMsg (DeprecatedAssignmentSyntaxID ):
3364
3364
override protected def msg (using Context ): String =
3365
- i """ Ambiguous syntax: this is interpreted as a named tuple with one element,
3365
+ i """ Deprecated syntax: since 3.7 this is interpreted as a named tuple with one element,
3366
3366
|not as an assignment.
3367
3367
|
3368
3368
|To assign a value, use curly braces: `{ ${key} = ${value}}`. """
Original file line number Diff line number Diff line change 1
1
-- [E203] Syntax Migration Warning: tests/warn/21681.scala:3:2 ---------------------------------------------------------
2
2
3 | (age = 29) // warn
3
3
| ^^^^^^^^^^
4
- | Ambiguous syntax: this is interpreted as a named tuple with one element,
4
+ | Deprecated syntax: since 3.7 this is interpreted as a named tuple with one element,
5
5
| not as an assignment.
6
6
|
7
7
| To assign a value, use curly braces: `{age = 29}`.
Original file line number Diff line number Diff line change 1
1
-- [E203] Syntax Migration Warning: tests/warn/21681b.scala:3:2 --------------------------------------------------------
2
2
3 | (age = 29) // warn
3
3
| ^^^^^^^^^^
4
- | Ambiguous syntax: this is interpreted as a named tuple with one element,
4
+ | Deprecated syntax: since 3.7 this is interpreted as a named tuple with one element,
5
5
| not as an assignment.
6
6
|
7
7
| To assign a value, use curly braces: `{age = 29}`.
Original file line number Diff line number Diff line change 1
1
-- [E203] Syntax Migration Warning: tests/warn/21681c.scala:5:2 --------------------------------------------------------
2
2
5 | (age = 29) // warn
3
3
| ^^^^^^^^^^
4
- | Ambiguous syntax: this is interpreted as a named tuple with one element,
4
+ | Deprecated syntax: since 3.7 this is interpreted as a named tuple with one element,
5
5
| not as an assignment.
6
6
|
7
7
| To assign a value, use curly braces: `{age = 29}`.
Original file line number Diff line number Diff line change 1
1
-- [E203] Syntax Migration Warning: tests/warn/21770.scala:5:9 ---------------------------------------------------------
2
2
5 | f(i => (cache = Some(i))) // warn
3
3
| ^^^^^^^^^^^^^^^^^
4
- | Ambiguous syntax: this is interpreted as a named tuple with one element,
4
+ | Deprecated syntax: since 3.7 this is interpreted as a named tuple with one element,
5
5
| not as an assignment.
6
6
|
7
7
| To assign a value, use curly braces: `{cache = Some(i)}`.
You can’t perform that action at this time.
0 commit comments