You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deffa(f: String?=>Unit):Unit= f(using"hello")
fa(42) // compiles with warning but does nothing
Output
[warn] -- [E129] PotentialIssueWarning:/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