Open
Description
Minimized code
compile:
class Test:
test("hello")
assert(1 == 1)
def test(name: String)(body: => Any) = ()
or more simply:
scala> def test(y: Int) =
| val x = 10
| x + y
|
def test(y: Int): Int
Output
[warn] -- [E129] Potential Issue Warning: Test.scala:2:6
[warn] 2 | test("hello")
[warn] | ^^^^^^^^^^^^^
[warn] |A pure expression does nothing in statement position; you may be omitting necessary parentheses
[warn] one warning found
Expectation
Same as putting braces, no warnings should be printed.
[error] test("hello")
[error] | assert(1 == 1)
[error] | ^^^^^^^^^^^^^^
[error] 🚩 Off-side rule violation. An indentation is started but the previous line does not end with a marker.