Closed
Description
Compiler version
3.3.0
Minimized code
def fa(f: String ?=> Unit): Unit = f(using "hello")
fa(42) // compiles with warning but does nothing
Output
[warn] -- [E129] Potential Issue Warning: /Test.scala:13:11
[warn] 13 | fa(42) // compiles but does nothing
[warn] | ^^
[warn] |A pure expression does nothing in statement position; you may be omitting necessary parentheses
[warn] |
[warn] | longer explanation available when compiling with `-explain`
Expectation
Compilation error. I expect this because 42
seems to not match the type String ?=> Unit