src/com/google/javascript/rhino/jstype/JSType.java
/**
   * Tests whether {@code this} and {@code that} are meaningfully
   * comparable using shallow comparison. By meaningfully, we mean compatible
   * types that are not rejected by step 1 of the definition of the Strict
   * Equality Comparison Algorithm (11.9.6, page 56&ndash;57) of the
   * ECMA-262 specification.<p>
   */
Tests whether  this and  that are meaningfully
comparable using shallow comparison. By meaningfully, we mean compatible
types that are not rejected by step 1 of the definition of the Strict
Equality Comparison Algorithm (11.9.6, page 56–57) of the
ECMA-262 specification.
Tests whether this and that are meaningfully comparable using shallow comparison . By meaningfully we mean compatible types that are not rejected by step 1 of the definition of the Strict Equality Comparison Algorithm ( 11 . 9 . 6 page 56–57 ) of the ECMA - 262 specification .
public final boolean canTestForShallowEqualityWith(JSType that) {
    if (isEmptyType() || that.isEmptyType()) {
      return isSubtypeOf(that) || that.isSubtypeOf(this);
    }
    JSType inf = getGreatestSubtype(that);
    return !inf.isEmptyType()
        ||
        areIdentical(inf, registry.getNativeType(JSTypeNative.LEAST_FUNCTION_TYPE));
  }
public final boolean canTestForShallowEqualityWith ( JSType that ) { if ( isEmptyType ( ) || that . isEmptyType ( ) ) { return isSubtypeOf ( that ) || that . isSubtypeOf ( this ) ; } JSType inf = getGreatestSubtype ( that ) ; return ! inf . isEmptyType ( ) || areIdentical ( inf , registry . getNativeType ( JSTypeNative . LEAST_FUNCTION_TYPE ) ) ; }
Tests whether {@code this} and {@code that} are meaningfully
 comparable using shallow comparison.
Tests whether { @code this } and { @code that } are meaningfully comparable using shallow comparison .
// Our getGreatestSubtype relation on functions is pretty bad. // Let's just say it's always ok to compare two functions. // Once the TODO in FunctionType is fixed, we should be able to // remove this.