src/com/google/javascript/rhino/jstype/FunctionType.java
/**
   * Two function types are equal if their signatures match. Since they don't have signatures, two
   * interfaces are equal if their names match.
   */
Two function types are equal if their signatures match. Since they don't have signatures, two
interfaces are equal if their names match.
Two function types are equal if their signatures match . Since they don ' t have signatures two interfaces are equal if their names match .
final boolean checkFunctionEquivalenceHelper(
      FunctionType that, EquivalenceMethod eqMethod, EqCache eqCache) {
    if (this == that) {
      return true;
    }
    if (kind != that.kind) {
      return false;
    }
    switch (kind) {
      case CONSTRUCTOR:
        return false; 
      case INTERFACE:
        return getReferenceName().equals(that.getReferenceName());
      case ORDINARY:
        return typeOfThis.checkEquivalenceHelper(that.typeOfThis, eqMethod, eqCache)
            && call.checkArrowEquivalenceHelper(that.call, eqMethod, eqCache);
      default:
        throw new AssertionError();
    }
  }
final boolean checkFunctionEquivalenceHelper ( FunctionType that , EquivalenceMethod eqMethod , EqCache eqCache ) { if ( this == that ) { return true ; } if ( kind != that . kind ) { return false ; } switch ( kind ) { case CONSTRUCTOR : return false ; case INTERFACE : return getReferenceName ( ) . equals ( that . getReferenceName ( ) ) ; case ORDINARY : return typeOfThis . checkEquivalenceHelper ( that . typeOfThis , eqMethod , eqCache ) && call . checkArrowEquivalenceHelper ( that . call , eqMethod , eqCache ) ; default : throw new AssertionError ( ) ; } }
Two function types are equal if their signatures match.
Two function types are equal if their signatures match .
// constructors use identity semantics, which we already checked for above.