public static boolean checkCoercedTypeP(Stella_Object self, Surrogate type, boolean shallowP, Object [] MV_returnarray) {
    if (Logic.checkStrictTypeP(self, type, shallowP)) {
      { boolean _return_temp = true;

        MV_returnarray[0] = self;
        return (_return_temp);
      }
    }
    { Stella_Object substitutedvalue = Logic.coerceIncompatibleValue(self, type);

      if (substitutedvalue != null) {
        { boolean _return_temp = true;

          MV_returnarray[0] = substitutedvalue;
          return (_return_temp);
        }
      }
    }
    if ((((QueryIterator)(Logic.$QUERYITERATOR$.get())) != null) &&
        (((QueryIterator)(Logic.$QUERYITERATOR$.get())).partialMatchStrategy != null)) {
      { boolean _return_temp = true;

        MV_returnarray[0] = self;
        return (_return_temp);
      }
    }
    else {
      { boolean _return_temp = false;

        MV_returnarray[0] = self;
        return (_return_temp);
      }
    }
  }