Is t a supertype of s?
966142
public boolean isSuperType(Type t, Type s) {
        switch (t.getTag()) {
        case ERROR:
            return true;
        case UNDETVAR: {
            UndetVar undet = (UndetVar)t;
            if (t == s ||
                undet.qtype == s ||
                s.hasTag(ERROR) ||
                s.hasTag(BOT)) {
                return true;
            }
            undet.addBound(InferenceBound.LOWER, s, this);
            return true;
        }
        default:
            return isSubtype(s, t);
        }
    }
721820
public boolean isSubtypes(List<Type> ts, List<Type> ss) {
        while (ts.tail != null && ss.tail != null
               /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
               isSubtype(ts.head, ss.head)) {
            ts = ts.tail;
            ss = ss.tail;
        }
        return ts.tail == null && ss.tail == null;
        /*inlined: ts.isEmpty() && ss.isEmpty();*/
    }
184754
def is_union_type(tp):
    
    if NEW_TYPING:
        return (tp is Union or
                isinstance(tp, _GenericAlias) and tp.__origin__ is Union)
    return type(tp) is _Union
468189
public <T> Class<T> isAssignableFrom(final Class<?> superType, final Class<T> type, final String message) {
        if (!superType.isAssignableFrom(type)) {
            fail(message);
        }
        return type;
    }
377621
def merged_type(t, s):
    # type: (AbstractType, AbstractType) -> Optional[AbstractType]
    
    if isinstance(t, TupleType) and isinstance(s, TupleType):
        if len(t.items) == len(s.items):
            return TupleType([combine_types([ti, si]) for ti, si in zip(t.items, s.items)])
        all_items = t.items + s.items
        if all_items and all(item == all_items[0] for item in all_items[1:]):
            # Merge multiple compatible fixed-length tuples into a variable-length tuple type.
            return ClassType('Tuple', [all_items[0]])
    elif (isinstance(t, TupleType) and isinstance(s, ClassType) and s.name == 'Tuple'
          and len(s.args) == 1):
        if all(item == s.args[0] for item in t.items):
            # Merge fixed-length tuple and variable-length tuple.
            return s
    elif isinstance(s, TupleType) and isinstance(t, ClassType) and t.name == 'Tuple':
        return merged_type(s, t)
    elif isinstance(s, NoReturnType):
        return t
    elif isinstance(t, NoReturnType):
        return s
    elif isinstance(s, AnyType):
        # This seems to be usually desirable, since Anys tend to come from unknown types.
        return t
    elif isinstance(t, AnyType):
        # Similar to above.
        return s
    return None
133275
function Type(name, super_types, fs) {
  this.super_types = [];
  this.name = name;
  if (super_types) {
    this.super_types = super_types;
  }
  this.fs = fs;
}
617266
function hasTextMimetype(types) {
      if (!types) return true;
      for (var i = 0; i < types.length; i++) {
        if (types[i] === 'Text' || types[i] === 'text/plain') return true;
      }
      return false;
    }
638525
protected String simonType(Simon simon) {
		String type = SimonInfo.UNKNOWN;
		if (simon instanceof Counter) {
			type = SimonInfo.COUNTER;
		} else if (simon instanceof Stopwatch) {
			type = SimonInfo.STOPWATCH;
		}
		return type;
	}
559902
public boolean hasSameBounds(ForAll t, ForAll s) {
        List<Type> l1 = t.tvars;
        List<Type> l2 = s.tvars;
        while (l1.nonEmpty() && l2.nonEmpty() &&
               isSameType(l1.head.getUpperBound(),
                          subst(l2.head.getUpperBound(),
                                s.tvars,
                                t.tvars))) {
            l1 = l1.tail;
            l2 = l2.tail;
        }
        return l1.isEmpty() && l2.isEmpty();
    }
1287214
def _superclasses_for_subject(self, graph, typeof):
        """"""
        # TODO - this might be replacing a fairly simple graph API query where
        # it doesn't need to
        classes = []
        superclass = typeof
        while True:
            found = False
            for p, o in self.schema_def.ontology[superclass]:
                if self.schema_def.lexicon['subclass'] == str(p):
                    found = True
                    classes.append(o)
                    superclass = o
            if not found:
                break
        return classes
80312
public Type boxedTypeOrType(Type t) {
        return t.isPrimitive() ?
            boxedClass(t).type :
            t;
    }
681729
public static boolean isPrimitiveLike(Type t)
  {
    if(isNumber(t)) {
      return true;
    }
    if(isBoolean(t)) {
      return true;
    }
    if(isEnum(t)) {
      return true;
    }
    if(isCharacter(t)) {
      return true;
    }
    if(isDate(t)) {
      return true;
    }
    if(t == String.class) {
      return true;
    }
    return false;
  }
317093
private boolean isAlleleCorrect(String allele, boolean acceptAmbiguousBases) {
        if (StringUtils.isNotEmpty(allele)) {
            for (char base : allele.toCharArray()) {
                if (!isValidBase(base, acceptAmbiguousBases)) {
                    return false;
                }
            }
        }
        return true;
    }
588063
public boolean isSubclassOf(TypeElement t1, TypeElement t2) {
        return typeUtils.isSubtype(t1.asType(), t2.asType());
    }
808454
function setSuperType(s) {
  const ss = _.isArray(s) ? s : [s]
  this.superClasses = _.uniq(this.superClasses.concat(ss))
}
791505
private static boolean isOriginalTsType(TsType type) {
        if (type instanceof TsType.BasicType) {
            TsType.BasicType basicType = (TsType.BasicType)type;
            return !(basicType.name.equals("null") || basicType.name.equals("undefined"));
        }
        return true;
    }
230400
@Pure
	protected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {
		if (isTypeReference(superType) && isTypeReference(subType)) {
			StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);
			LightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);
			LightweightTypeReference reference = factory.toLightweightReference(subType);
			return reference.isSubtypeOf(superType.getType());
		}
		return false;
	}