Checks that the given expressions are compatible with the given types.
195517
static void checkTypes(ImmutableList<Type> types, Iterable<? extends Expression> exprs) {
    int size = Iterables.size(exprs);
    checkArgument(
        size == types.size(),
        "Supplied the wrong number of parameters. Expected %s, got %s",
        types.size(),
        size);
    // checkIsAssignableTo is an no-op if DEBUG is false
    if (Flags.DEBUG) {
      int i = 0;
      for (Expression expr : exprs) {
        expr.checkAssignableTo(types.get(i), "Parameter %s", i);
        i++;
      }
    }
  }
1331289
public static void checkTypeConsistency(Schema schema, String fieldName,
      Object... values) {
    checkTypeConsistency(schema, null, fieldName, values);
  }
419972
public boolean compatible( PropertySet properties)
    {
    boolean isCompatible;
    Iterator<IDisjunct> disjuncts;
    
    for( disjuncts = getDisjuncts(),
           isCompatible = true;
           

         isCompatible
           && disjuncts.hasNext();

         isCompatible = disjuncts.next().compatible( properties));
    
    return isCompatible;
    }
948337
public static boolean annotationTypeMatches(Class<? extends Annotation> type, JavacNode node) {
		if (node.getKind() != Kind.ANNOTATION) return false;
		return typeMatches(type, node, ((JCAnnotation) node.get()).annotationType);
	}
457672
public static boolean isBinaryExpressionType(Expression expression, List<String> tokens) {
        if (expression instanceof BinaryExpression) {
            if (tokens.contains(((BinaryExpression) expression).getOperation().getText())) {
                return true;
            }
        }
        return false;
    }
479942
protected void findMatching(Class<? extends T> type, BiPredicate<Class<? extends T>, D> predicate)
	{
		traverseType(type, predicate, new HashSet<>());
	}
650491
protected void checkTypes(TermType expectedBaseType, TermType argumentType) {
        if (argumentType.isAbstract())
            throw new AbstractTermTypeException(argumentType);

        if (!argumentType.isA(expectedBaseType)) {
            throw new IncompatibleTermException(expectedBaseType, argumentType);
        }
    }
1169273
@Check
	public void checkAssertKeywordUse(SarlAssertExpression expression) {
		final XExpression condition = expression.getCondition();
		if (condition != null) {
			final LightweightTypeReference fromType = getActualType(condition);
			if (!fromType.isAssignableFrom(Boolean.TYPE)) {
				error(MessageFormat.format(
						Messages.SARLValidator_38,
						getNameOfTypes(fromType), boolean.class.getName()),
						condition,
						null,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						INCOMPATIBLE_TYPES);
				return;
			}
			if (getExpressionHelper() instanceof SARLExpressionHelper) {
				final SARLExpressionHelper helper = (SARLExpressionHelper) getExpressionHelper();
				final Boolean constant = helper.toBooleanPrimitiveWrapperConstant(condition);
				if (constant == Boolean.TRUE && !isIgnored(DISCOURAGED_BOOLEAN_EXPRESSION)) {
					addIssue(Messages.SARLValidator_51,
							condition,
							null,
							ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
							DISCOURAGED_BOOLEAN_EXPRESSION);
					return;
				}
			}
		}
	}
624824
private static boolean areFieldsCompatible(String sourceField, TypeInformation<?> inType, String targetField,
			TypeInformation<?> outType, boolean throwException) {

		try {
			// get source type information
			TypeInformation<?> sourceType = getExpressionTypeInformation(sourceField, inType);
			// get target type information
			TypeInformation<?> targetType = getExpressionTypeInformation(targetField, outType);
			return sourceType.equals(targetType);
		} catch (InvalidFieldReferenceException e) {
			if (throwException) {
				throw e;
			} else {
				return false;
			}
		}
	}
1021952
function(args, types) {
		this._validating = true;
		var is = this._match(args, types);
		this._validating = false;
		return is;
	}
1135981
def _validate_incompatibilities(self, incompatibles):
        """"""
        for element in incompatibles:
            if type(element) is list:
                i = [a for a in element if self._get_parameter(a)]
                if len(i) > 1:
                    raise ValueError("Options {} are incompatible".format(" and ".join(i)))
            elif type(incompatibles) is dict:
                if self._get_parameter(element):
                    for b in incompatibles[element]:
                        if self._get_parameter(b):
                            raise ValueError("Options %s and %s are incompatible."
                                             % (element, b))
            else:
                for a in element:
                    if self._get_parameter(a):
                        for b in incompatibles[a]:
                            if self._get_parameter(b):
                                raise ValueError("Options %s and %s are incompatible."
                                                 % (a, b))
847313
private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
		if (to.equals(from))
			return true;

		if (from instanceof TypeVariable) {
			return to.equals(typeMap.get(((TypeVariable<?>) from).getName()));
		}

		return false;
	}
58980
protected static function ensureTypes()
    {
        if (self::$doneScanning && count(self::$types) > 0) {
            return;
        }

        foreach (self::types() as $t) {
        }
    }
736188
private boolean validTypeTransformationExpression(Node expr) {
    if (!isValidExpression(expr)) {
      warnInvalidExpression("type transformation", expr);
      return false;
    }
    if (isTypeVar(expr) || isTypeName(expr)) {
      return true;
    }
    // Check for valid keyword
    String name = getCallName(expr);
    if (!isValidKeyword(name)) {
      warnInvalidExpression("type transformation", expr);
      return false;
    }
    Keywords keyword = nameToKeyword(name);
    // Check the rest of the expression depending on the kind
    switch (keyword.kind) {
      case TYPE_CONSTRUCTOR:
        return validTypeExpression(expr);
      case OPERATION:
        return validOperationExpression(expr);
      default:
        throw new IllegalStateException("Invalid type transformation expression");
    }
  }
755347
@SafeVarargs
	public static <T extends RValue> T checkType(RValue operand, SyntacticItem context, Class<T>... types) {
		// Got through each type in turn checking for a match
		for (int i = 0; i != types.length; ++i) {
			if (types[i].isInstance(operand)) {
				// Matched!
				return (T) operand;
			}
		}
		// No match, therefore through an error
		if (operand == null) {
			error("null operand", context);
		} else {
			error("operand returned " + operand.getClass().getName() + ", expecting one of " + Arrays.toString(types),
					context);
		}
		return null;
	}
1297428
function mergeTypes(...types) {
  let allTypes = [];
  types.forEach(type => {
    (type.allTypes || [type]).forEach(type => {
      if (allTypes.indexOf(type) < 0) allTypes.push(type);
    });
  });
  return allTypes;
}
661939
private static boolean hasMatch(String[] typeParams, String... type) {
    boolean matches = false;
    for(String t : type) {
      for(String typeParam : typeParams) {
        if(typeParam.contains("/")) {
          String typePart = typeParam.replace("*", "");
          if(t.startsWith(typePart) || t.endsWith(typePart)) {
            matches = true;
            break;
          }
        } else if(t.equals(typeParam)) {
          matches = true;
          break;
        }
      }
      if(matches) {
        break;
      }
    }
    return matches;
  }