Closed
Description
In #4180, note that the error message is very misleading; even after this comparison is allowed, I'd expect this issue to apply to other examples:
object Bar {
true == (true: java.lang.Boolean)
}
gives
-- Error: /tmp/scastie843852333271942738/src/main/scala/main.scala:3:2 ---------
3 | true == (true: java.lang.Boolean)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Values of types Boolean and Boolean cannot be compared with == or !=