Package org.rascalmpl.ast

Examples of org.rascalmpl.ast.TypeVar


        if (!formal.isVariable()) {
          throw new SyntaxError(
              "Declaration of parameterized type with type instance "
                  + formal + " is not allowed", formal.getLocation());
        }
        TypeVar var = formal.getTypeVar()
        Type bound = var.hasBound() ? var.getBound().typeOf(env, true, eval) : tf
            .valueType();
        params[i++] = tf
            .parameterType(Names.name(var.getName()), bound);
      }
    } else {
      params = new Type[0];
    }
    return params;
View Full Code Here


      super(__param1, __param2);
    }

    @Override
    public org.eclipse.imp.pdb.facts.type.Type typeOf(Environment env, boolean instantiateTypeParameters, IEvaluator<Result<IValue>> eval) {
      TypeVar var = this.getTypeVar();
      org.eclipse.imp.pdb.facts.type.Type param;

      if (var.isBounded()) {
        param = TF.parameterType(Names.name(var.getName()), var
            .getBound().typeOf(env, instantiateTypeParameters, eval));
      } else {
        param = TF.parameterType(Names.name(var.getName()));
      }

      if (instantiateTypeParameters) {
        return param.instantiate(env.getTypeBindings());
      }
View Full Code Here

TOP

Related Classes of org.rascalmpl.ast.TypeVar

Copyright © 2018 www.massapicom. 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.