Пример #1
0
  @Override
  public A_Type returnTypeGuaranteedByVM(final List<? extends A_Type> argumentTypes) {
    final A_Type meta1 = argumentTypes.get(0);
    final A_Type meta2 = argumentTypes.get(1);

    return meta1.typeIntersection(meta2); // by metavariance
  }
Пример #2
0
 @Override
 public Result attempt(
     final List<AvailObject> args, final Interpreter interpreter, final boolean skipReturnCheck) {
   assert args.size() == 2;
   final A_Type type1 = args.get(0);
   final A_Type type2 = args.get(1);
   return interpreter.primitiveSuccess(type1.typeIntersection(type2).makeImmutable());
 }