# isAssignableFrom method

bool isAssignableFrom(

1. ResolvableType other,
2. bool strict,
3. Map<Type, Type>? matchedBefore,
4. bool upUntilUnresolvable,

)

## Implementation

    bool isAssignableFrom(ResolvableType other, bool strict, Map<Type, Type>? matchedBefore, bool upUntilUnresolvable) {
      // If we cannot resolve types, we are not assignable
      if (this == NONE || other == NONE) {
        return false;
      }

      if (matchedBefore != null && matchedBefore[_type] == other._type) {
        return true;
      }

      if (upUntilUnresolvable && (other._isUnresolvableTypeVariable() || other._isDynamicType())) {
        return true;
      }

      // Deal with array by delegating to the component type
      if (isArray()) {
        return other.isArray() &&
               getComponentType().isAssignableFrom(other.getComponentType(), true, matchedBefore, upUntilUnresolvable);
      }

      // Main assignability check
      final ourResolved = resolve();
      final otherResolved = other.resolve();

      if (ourResolved == null || otherResolved == null) {
        return false;
      }

      if (strict) {
        return ourResolved.getType() == otherResolved.getType();
      } else {
        return ourResolved.isAssignableFrom(otherResolved);
      }
    }