Examples of lub()


Examples of org.eclipse.imp.pdb.facts.type.Type.lub()

            }
            continue;
          }
        }

        elementType = elementType.lub(resultElem.getType());
        results.add(results.size(), resultElem.getValue());
      }

      Type resultType = TF.listType(elementType);
      IListWriter w = __eval.__getVf().listWriter();
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.lub()

    @Override
    public Type typeOf(Environment env, boolean instantiateTypeParameters, IEvaluator<Result<IValue>> eval) {
      Type elementType = TF.voidType();

      for (org.rascalmpl.ast.Expression elt : getElements0()) {
        elementType = elementType.lub(elt.typeOf(env, instantiateTypeParameters, eval));
      }

      return TF.listType(elementType);
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.lub()

    } else if(subjectType.isTuple()){
      if(shallow){
        Type lub = TypeFactory.getInstance().voidType();
        int nElems = subjectType.getArity();
        for(int i = 0; i < nElems; i++)
          lub = lub.lub(subjectType.getFieldType(i));
        if(!lub.comparable(patType))
          throw new UnexpectedType(patType, subjectType, ctx.getCurrentAST())
        return new TupleElementIterator((ITuple)subjectValue);
      }
      return new DescendantReader(subjectValue, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.