Determines if the supplied type should be checked as a bivariant
templatized type rather the standard invariant templatized type
rules.
344256
static boolean isBivariantType(JSType type) {
    ObjectType objType = type.toObjectType();
    return objType != null
        // && objType.isNativeObjectType()
        && BIVARIANT_TYPES.contains(objType.getReferenceName());
  }
328051
def is_fundamental(type_):
    """"""
    return does_match_definition(
        type_,
        cpptypes.fundamental_t,
        (cpptypes.const_t, cpptypes.volatile_t)) \
        or does_match_definition(
            type_,
            cpptypes.fundamental_t,
            (cpptypes.volatile_t, cpptypes.const_t))
1217249
public static boolean isPrimitive(Type type) {
        return type.equals(boolean.class)
                || type.equals(double.class)
                || type.equals(float.class)
                || type.equals(short.class)
                || type.equals(int.class)
                || type.equals(long.class)
                || type.equals(byte.class)
                || type.equals(char.class);
    }
11960
private void checkStrictParamType(
      final TemplateNode node, final TemplateParam param, @Nullable SoyValueProvider paramValue) {
    Kind kind = param.type().getKind();
    if (kind == Kind.ANY || kind == Kind.UNKNOWN) {
      // Nothing to check.  ANY and UKNOWN match all types.
      return;
    }
    if (paramValue == null) {
      paramValue = NullData.INSTANCE;
    } else if (paramValue instanceof SoyAbstractCachingValueProvider) {
      SoyAbstractCachingValueProvider typedValue = (SoyAbstractCachingValueProvider) paramValue;
      if (!typedValue.isComputed()) {
        // in order to preserve laziness we tell the value provider to assert the type when
        // computation is triggered
        typedValue.addValueAssertion(
            new ValueAssertion() {
              @Override
              public void check(SoyValue value) {
                checkValueType(param, value, node);
              }
            });
        return;
      }
    } else if (param.hasDefault() && paramValue.resolve() instanceof UndefinedData) {
      // Default parameters are undefined if they're unset.
      return;
    }
    checkValueType(param, paramValue.resolve(), node);
  }
97651
def has_vtable(decl_type):
    """"""
    assert isinstance(decl_type, class_declaration.class_t)
    return bool(
        decl_type.calldefs(
            lambda f: isinstance(f, calldef_members.member_function_t) and
            f.virtuality != calldef_types.VIRTUALITY_TYPES.NOT_VIRTUAL,
            recursive=False,
            allow_empty=True))
955627
function isConsistent(t) {
    return t.type === UNARY   ? isConsistent (t.types.$1) :
           t.type === BINARY  ? isConsistent (t.types.$1) &&
                                isConsistent (t.types.$2) :
           /* else */           t.type !== INCONSISTENT;
  }
169089
def __ensure_type (targets):
    
    assert is_iterable_typed(targets, virtual_target.VirtualTarget)
    for t in targets:
        if not t.type ():
            get_manager().errors()("target '%s' has no type" % str (t))
479942
protected void findMatching(Class<? extends T> type, BiPredicate<Class<? extends T>, D> predicate)
	{
		traverseType(type, predicate, new HashSet<>());
	}
687113
private static boolean isAssignableFrom(ParameterizedType type1, Class<?> type2) {
        Class<?> rawType1 = Reflections.getRawType(type1);

        // raw types have to be assignable
        if (!isAssignableFrom(rawType1, type2)) {
            return false;
        }
        // this is a raw type with missing type arguments
        if (!Types.getCanonicalType(type2).equals(type2)) {
            return true;
        }

        return matches(type1, new HierarchyDiscovery(type2));
    }
253227
def is_type_factory(_type):
    

    def inner(x):
        if type(x) != _type:
            raise ValueError("Value must have type '%s'" % str(_type))

    return inner
1033426
public static boolean blockVariantMatches(IBlockState bs, List<Variation> allowedVariants)
    {
        for (IProperty prop : bs.getProperties().keySet())
        {
            if (prop.getName().equals("variant") && prop.getValueClass().isEnum())
            {
                Object current = bs.getValue(prop);
                if (current != null)
                {
                    for (Variation var : allowedVariants)
                    {
                        if (var.getValue().equalsIgnoreCase(current.toString()))
                            return true;
                    }
                }
            }
        }
        return false;
    }
776571
private boolean isSupported(Class<?> t)
   {
      if (Boolean.class.equals(t) || boolean.class.equals(t) ||
          Byte.class.equals(t) || byte.class.equals(t) ||
          Short.class.equals(t) || short.class.equals(t) ||
          Integer.class.equals(t) || int.class.equals(t) ||
          Long.class.equals(t) || long.class.equals(t) ||
          Float.class.equals(t) || float.class.equals(t) ||
          Double.class.equals(t) || double.class.equals(t) ||
          Character.class.equals(t) || char.class.equals(t) ||
          String.class.equals(t))
         return true;

      return false;
   }
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
368896
def _is_valid_type(self, inpt):
        """"""
        from dlkit.abstract_osid.type.primitives import Type as abc_type
        if isinstance(inpt, abc_type):
            return True
        else:
            return False
85607
@SuppressWarnings("unchecked")
   public static boolean typesMatch(Class<?>[] c1, Class[] c2) {
      if (c1.length != c2.length) {
         return false;
      }
      for (int i = 0; i < c1.length; i++) {
         if (!inSameHierarchy(c1[i], c2[i]) && !isConvertible(c1[i], c2[i])) {
            return false;
         }
      }
      return true;
   }
1177188
function maybeTypeOfKind(type, kind) {
            if (type.flags & kind) {
                return true;
            }
            if (type.flags & 1572864 /* UnionOrIntersection */) {
                var types = type.types;
                for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
                    var t = types_13[_i];
                    if (maybeTypeOfKind(t, kind)) {
                        return true;
                    }
                }
            }
            return false;
        }
414493
private static boolean doIsAssignableFrom(Type left, Type right, boolean failOpen) {
    if (left.equals(right)) {
      return true;
    }
    if (left.getSort() != right.getSort()) {
      return false;
    }
    if (left.getSort() != Type.OBJECT) {
      return false; // all other sorts require exact equality (even arrays)
    }
    // for object types we really need to know type hierarchy information to test for whether
    // right is assignable to left.
    Optional<Class<?>> leftClass = objectTypeToClassCache.getUnchecked(left);
    Optional<Class<?>> rightClass = objectTypeToClassCache.getUnchecked(right);
    if (!leftClass.isPresent() || !rightClass.isPresent()) {
      // This means one of the types being compared is a generated object.  So we can't easily check
      // it.  Just delegate responsibility to the verifier.
      return failOpen;
    }
    return leftClass.get().isAssignableFrom(rightClass.get());
  }