File tree Expand file tree Collapse file tree 8 files changed +9
-9
lines changed
src/dotty/tools/dotc/reporting
language-server/test/dotty/tools/languageserver Expand file tree Collapse file tree 8 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2403,7 +2403,7 @@ class MemberWithSameNameAsStatic()(using Context)
24032403class PureExpressionInStatementPosition (stat : untpd.Tree , val exprOwner : Symbol )(using Context )
24042404 extends Message (PureExpressionInStatementPositionID ) {
24052405 def kind = MessageKind .PotentialIssue
2406- def msg (using Context ) = " A pure expression does nothing in statement position; you may be omitting necessary parentheses "
2406+ def msg (using Context ) = " A pure expression does nothing in statement position"
24072407 def explain (using Context ) =
24082408 i """ The pure expression $stat doesn't have any side effect and its result is not assigned elsewhere.
24092409 |It can be removed without changing the semantics of the program. This may indicate an error. """
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ scala> def f = { 1; 2 }
2727-- [E129 ] Potential Issue Warning : ---------------------------------------------
28281 | def f = { 1 ; 2 }
2929 | ^
30- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
30+ | A pure expression does nothing in statement position
3131 |
3232 | longer explanation available when compiling with `-explain`
3333def f : Int
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class DiagnosticsTest {
3030 |} """
3131 .diagnostics(m1,
3232 (m1 to m2,
33- " A pure expression does nothing in statement position; you may be omitting necessary parentheses " ,
33+ " A pure expression does nothing in statement position" ,
3434 Warning , Some (PureExpressionInStatementPositionID )))
3535
3636 @ Test def diagnosticWorksheetPureExpression : Unit =
Original file line number Diff line number Diff line change 11-- [E129] Potential Issue Warning: tests/neg-macros/annot-suspend-cycle/Macro.scala:7:4 --------------------------------
227 | new Foo
33 | ^^^^^^^
4- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
4+ | A pure expression does nothing in statement position
55 |
66 | longer explanation available when compiling with `-explain`
77Cyclic macro dependencies in tests/neg-macros/annot-suspend-cycle/Test.scala.
Original file line number Diff line number Diff line change 1313-- [E129] Potential Issue Warning: tests/neg/i18408a.scala:4:16 --------------------------------------------------------
14144 |def test2 = fa({42; ()})
1515 | ^^
16- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
16+ | A pure expression does nothing in statement position
1717 |
1818 | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1313-- [E129] Potential Issue Warning: tests/neg/i18408b.scala:4:16 --------------------------------------------------------
14144 |def test2 = fa({42; ()})
1515 | ^^
16- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
16+ | A pure expression does nothing in statement position
1717 |
1818 | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1313-- [E129] Potential Issue Warning: tests/neg/i18408c.scala:4:16 --------------------------------------------------------
14144 |def test2 = fa({42; ()})
1515 | ^^
16- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
16+ | A pure expression does nothing in statement position
1717 |
1818 | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Matching filters for @nowarn or -Wconf:
3232-- [E129] Potential Issue Warning: tests/neg/nowarn.scala:15:11 --------------------------------------------------------
333315 |def t2 = { 1; 2 } // warning (the invalid nowarn doesn't silence anything)
3434 | ^
35- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
35+ | A pure expression does nothing in statement position
3636 |
3737 | longer explanation available when compiling with `-explain`
3838-- Warning: tests/neg/nowarn.scala:14:8 --------------------------------------------------------------------------------
@@ -43,7 +43,7 @@ Matching filters for @nowarn or -Wconf:
4343-- [E129] Potential Issue Warning: tests/neg/nowarn.scala:18:12 --------------------------------------------------------
444418 |def t2a = { 1; 2 } // warning (invalid nowarn doesn't silence)
4545 | ^
46- | A pure expression does nothing in statement position; you may be omitting necessary parentheses
46+ | A pure expression does nothing in statement position
4747 |
4848 | longer explanation available when compiling with `-explain`
4949-- Warning: tests/neg/nowarn.scala:17:8 --------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments