src/com/google/javascript/jscomp/TypeCheck.java
/**
   * Given a constructor or an interface type, find out whether the unknown
   * type is a supertype of the current type.
   */
Given a constructor or an interface type, find out whether the unknown
type is a supertype of the current type.
Given a constructor or an interface type find out whether the unknown type is a supertype of the current type .
private static boolean hasUnknownOrEmptySupertype(FunctionType ctor) {
    checkArgument(ctor.isConstructor() || ctor.isInterface());
    checkArgument(!ctor.isUnknownType());
    while (true) {
      ObjectType maybeSuperInstanceType =
          ctor.getPrototype().getImplicitPrototype();
      if (maybeSuperInstanceType == null) {
        return false;
      }
      if (maybeSuperInstanceType.isUnknownType()
          || maybeSuperInstanceType.isEmptyType()) {
        return true;
      }
      ctor = maybeSuperInstanceType.getConstructor();
      if (ctor == null) {
        return false;
      }
      checkState(ctor.isConstructor() || ctor.isInterface());
    }
  }
private static boolean hasUnknownOrEmptySupertype ( FunctionType ctor ) { checkArgument ( ctor . isConstructor ( ) || ctor . isInterface ( ) ) ; checkArgument ( ! ctor . isUnknownType ( ) ) ; while ( true ) { ObjectType maybeSuperInstanceType = ctor . getPrototype ( ) . getImplicitPrototype ( ) ; if ( maybeSuperInstanceType == null ) { return false ; } if ( maybeSuperInstanceType . isUnknownType ( ) || maybeSuperInstanceType . isEmptyType ( ) ) { return true ; } ctor = maybeSuperInstanceType . getConstructor ( ) ; if ( ctor == null ) { return false ; } checkState ( ctor . isConstructor ( ) || ctor . isInterface ( ) ) ; } }
Given a constructor or an interface type, find out whether the unknown
 type is a supertype of the current type.
Given a constructor or an interface type find out whether the unknown type is a supertype of the current type .
// The type system should notice inheritance cycles on its own // and break the cycle.