Return true if this parameter is assignable to the target parameter. This will consider
subclassing, autoboxing and null.
772386
boolean isAssignableTo(Parameter target, VisitorState state) {
    if (state.getTypes().isSameType(type(), Type.noType)
        || state.getTypes().isSameType(target.type(), Type.noType)) {
      return false;
    }
    try {
      return state.getTypes().isAssignable(type(), target.type());
    } catch (CompletionFailure e) {
      // Report completion errors to avoid e.g. https://github.com/bazelbuild/bazel/issues/4105
      Check.instance(state.context)
          .completionError((DiagnosticPosition) state.getPath().getLeaf(), e);
      return false;
    }
  }
358504
def is_declared(self, name, local_only=False):
        """"""
        if name in self.declared_locally or name in self.declared_parameter:
            return True
        if local_only:
            return False
        return name in self.declared
905830
@Override
    public boolean hasInstance(Scriptable value) {
        Scriptable proto = value.getPrototype();
        while (proto != null) {
            if (proto.equals(this))
                return true;
            proto = proto.getPrototype();
        }

        return false;
    }
1181487
private static boolean isBindingCompatible( Tuple tuple, VarBindingDef binding)
    {
    VarValueDef currentValue = tuple.getBinding( binding.getVarDef());
    return (currentValue == null || currentValue.equals( binding.getValueDef()));
    }
1087307
public boolean isAssignableFrom(JvmType type) {
		if (type == null) {
			throw new IllegalArgumentException("type may not be null");
		}
		LightweightTypeReference other = getOwner().toPlainTypeReference(type);
		boolean result = isAssignableFrom(other);
		return result;
	}
901129
private boolean isObjectMethod(Method method) {
    for (Method objectMethod : Object.class.getMethods()) {
      if (method.getName().equals(objectMethod.getName())) {
        if (equalParamTypes(objectMethod.getParameterTypes(), method.getParameterTypes())) {
          return true;
        }
      }
    }

    return false;
  }
385617
private boolean areTypesAssignable(Class<?> source, Class<?> target)
   {
      if (target.isAssignableFrom(source))
      {
         return true;
      }
      else if (!source.isPrimitive() && !target.isPrimitive())
      {
         return false;
      }
      else if (source.isPrimitive())
      {
         // source is primitive
         return primitiveToWrapperMap.get(source) == target;
      }
      else
      {
         // target is primitive
         return source == primitiveToWrapperMap.get(target);
      }
   }
321131
function isParameterAssigned(symbol) {
            var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
            var links = getNodeLinks(func);
            if (!(links.flags & 4194304 /* AssignmentsMarked */)) {
                links.flags |= 4194304 /* AssignmentsMarked */;
                if (!hasParentWithAssignmentsMarked(func)) {
                    markParameterAssignments(func);
                }
            }
            return symbol.isAssigned || false;
        }
668606
public boolean isValidAssignment(DynamicAssignment assignment) {
    if (!fixedVariables.isValidAssignment(assignment.getFixedAssignment())) {
      return false;
    }

    for (int i = 0; i < plateNames.size(); i++) {
      List<DynamicAssignment> plateValues = assignment.getPlateValue(plateNames.get(i));
      for (DynamicAssignment plateValue : plateValues) {
        if (!plates.get(i).isValidAssignment(plateValue)) {
          return false;
        }
      }
    }
    return true;
  }
574315
private boolean canMakeCopyUsing(
      ImmutableList<ExecutableElement> copyOfMethods,
      ExecutableElement valueGetter,
      ExecutableElement setter) {
    DeclaredType targetType = MoreTypes.asDeclared(getterToPropertyType.get(valueGetter));
    TypeMirror parameterType = setter.getParameters().get(0).asType();
    for (ExecutableElement copyOfMethod : copyOfMethods) {
      if (canMakeCopyUsing(copyOfMethod, targetType, parameterType)) {
        return true;
      }
    }
    String targetTypeSimpleName = targetType.asElement().getSimpleName().toString();
    String error =
        String.format(
            "Parameter type of setter method should be %s to match getter %s.%s, or it should be a "
                + "type that can be passed to %s.%s to produce %s",
            targetType,
            autoValueClass,
            valueGetter.getSimpleName(),
            targetTypeSimpleName,
            copyOfMethods.get(0).getSimpleName(),
            targetType);
    errorReporter.reportError(error, setter);
    return false;
  }
1025039
private static boolean isLowerBoundCompatible(final WildcardType type, final Class... with) {
        boolean res = true;
        if (type.getLowerBounds().length > 0) {
            // only one super could be used
            // couldn't be an object here as ? super Object is always replaced to simply Object before comparison
            final Class<?> lower = GenericsUtils.resolveClassIgnoringVariables(type.getLowerBounds()[0]);

            // target may only be lower bound's super type (or same type)
            for (Class<?> target : with) {
                if (!target.isAssignableFrom(lower)) {
                    res = false;
                    break;
                }
            }
        }
        return res;
    }
653428
private boolean canOptimizeObjectCreate(Node firstParam) {
    Node curParam = firstParam;
    while (curParam != null) {
      if (!isOptimizableKey(curParam)) {
        return false;
      }
      curParam = curParam.getNext();

      // Check for an odd number of parameters.
      if (curParam == null) {
        return false;
      }
      curParam = curParam.getNext();
    }
    return true;
  }
1189903
public boolean isAssignableFrom(JClass cl)
  {
    if (getName().equals(cl.getName()))
      return true;

    JClass []ifc = cl.getInterfaces();

    for (int i = 0; i < ifc.length; i++) {
      if (isAssignableFrom(ifc[i]))
        return true;
    }

    if (cl.getSuperClass() != null)
      return isAssignableFrom(cl.getSuperClass());
    else
      return false;
  }
635193
@Override
    public int isCompatible(Class<?> target, Object actual) {
        int superCompat = super.isCompatible(target, actual);
        if (superCompat >= 0 && superCompat < 3) {
            return superCompat;
        }

        Class<?> actualClass = actual.getClass();
        if (actualClass == Types.UNDEFINED.getClass() || actualClass == Types.NULL.getClass()) {
            return 3;
        }

        if (JSFunction.class.isAssignableFrom(actualClass)) {
            if (isSingleAbstractMethod(target) != null) {
                return 3;
            }
        }

        return -1;
    }
318253
boolean isRemovableAssign(Node n) {
    return (NodeUtil.isAssignmentOp(n) && n.getFirstChild().isName()) || n.isInc() || n.isDec();
  }
1086056
@SuppressWarnings("unchecked")
    private static boolean isParametersCompatible(final List<Class<?>> params,
                                                  final List<ParamInfo> ordinalParamInfos) {
        boolean resolution = params.size() == ordinalParamInfos.size();
        if (resolution && !params.isEmpty()) {
            final Iterator<Class<?>> paramsIt = params.iterator();
            final Iterator<ParamInfo> targetIt = ordinalParamInfos.iterator();
            while (paramsIt.hasNext()) {
                final Class<?> type = paramsIt.next();
                final ParamInfo paramInfo = targetIt.next();
                if (!paramInfo.type.isAssignableFrom(type)) {
                    resolution = false;
                    break;
                }
            }
        }
        return resolution;
    }
546152
@FormatMethod
  public final void checkAssignableTo(Type expected, String fmt, Object... args) {
    if (Flags.DEBUG && !BytecodeUtils.isPossiblyAssignableFrom(expected, resultType())) {
      String message =
          String.format(
              "Type mismatch. %s not assignable to %s.",
              resultType().getClassName(), expected.getClassName());
      if (!fmt.isEmpty()) {
        message = String.format(fmt, args) + ". " + message;
      }

      throw new IllegalArgumentException(message);
    }
  }