Minimized code
object Test {
extension (x: Int)
inline def times(inline op: Unit): Unit = {
var count = 0
while count < x do
op
count += 1
}
10.times { println("hello") }
}
Output
-- [E129] Potential Issue Warning: examples/times.scala:7:8 --------------------
7 | op
| ^^
|A pure expression does nothing in statement position; you may be omitting necessary parentheses
Expectation
The compiler should not generate the warning.