Type resolver for equal (==) and not equal (!=) operators. The resolver returns null if two
SoyType instances are not comparable, otherwise always return
BoolType.
In particular,
- Comparing anything with UNKNOWN, ANY, and NULL is legitimate.
- If one is assignable from another, comparing them is legitimate.
- If both are primitive types, comparing them is legitimate.
- All other comparisons should have exactly the same types on both sides. Coercing is
unsafe, especially in JS backend. An example is a jspb message that contains a single
enum. Assuming that the enum is 1, the representation in JS is
[1], and this is
equivalent to a number.