Describe the Bug
If someone uses == and != on two values that are completely incompatible types, it will likely work at runtime but is almost certainly a bug.
x: int = 1
y: str = ""
if x == y:
pass
We should give an error in such cases, with a custom error code so that it can be disabled if necessary.
I was thinking we could just check that is_subset_eq(x, y) or is_subset_eq(y, x) are both false, but there's probably some nuance here in how we want to handle unions.
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response