Examples of UnsupportedSubscriptArity


Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

 
  @Override
  @SuppressWarnings("unchecked")
  public <U extends IValue, V extends IValue> Result<U> subscript(Result<?>[] subscripts) {
    if (subscripts.length > 1) {
      throw new UnsupportedSubscriptArity(getType(), subscripts.length, ctx.getCurrentAST());
    }
    Result<IValue> subsBase = (Result<IValue>)subscripts[0];
    if(subsBase == null)
      /*
       * Wild card not allowed as tuple subscript
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

 
  @Override
  @SuppressWarnings("unchecked")
  public <U extends IValue, V extends IValue> Result<U> subscript(Result<?>[] subscripts) {
    if (subscripts.length != 1) {
      throw new UnsupportedSubscriptArity(getType(), subscripts.length, ctx.getCurrentAST());
    }
    Result<IValue> key = (Result<IValue>) subscripts[0];
    if (!key.getType().isInteger()) {
      throw new UnexpectedType(TypeFactory.getInstance().integerType(), key.getType(), ctx.getCurrentAST());
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

          throw RuntimeExceptionFactory.indexOutOfBounds(index, ctx.getCurrentAST(), ctx.getStackTrace());
        }
        return makeResult(getType().getElementType(), getValue().get(idx), ctx);
      }
      if (nSubs >= getType().getArity()) {
        throw new UnsupportedSubscriptArity(getType(), nSubs, ctx.getCurrentAST());
      }
      int relArity = getType().getArity();
     
      Type subscriptType[] = new Type[nSubs];
      boolean subscriptIsSet[] = new boolean[nSubs];
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

  @Override
  @SuppressWarnings("unchecked")
  public <U extends IValue, V extends IValue> Result<U> subscript(Result<?>[] subscripts) {
    if (subscripts.length != 1) {
      throw new UnsupportedSubscriptArity(getType(), subscripts.length, ctx.getCurrentAST());
    }
    Result<IValue> key = (Result<IValue>) subscripts[0];
    if (!getType().getKeyType().comparable(key.getType())) {
      throw new UnexpectedType(getType().getKeyType(), key.getType(), ctx.getCurrentAST());
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

      if(getType().getElementType().isBottom()) throw RuntimeExceptionFactory.noSuchElement(subscripts[0].getValue(), ctx.getCurrentAST(), ctx.getStackTrace());
     
      // TODO: must go to PDB
      int nSubs = subscripts.length;
      if (nSubs >= getType().getArity()) {
        throw new UnsupportedSubscriptArity(getType(), nSubs, ctx.getCurrentAST());
      }
      int relArity = getType().getArity();
     
      Type subscriptType[] = new Type[nSubs];
      boolean subscriptIsSet[] = new boolean[nSubs];
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

 
  @SuppressWarnings("unchecked")
  @Override
  public <U extends IValue, V extends IValue> Result<U> subscript(Result<?>[] subscripts) {
    if (subscripts.length != 1) {
      throw new UnsupportedSubscriptArity(getType(), subscripts.length, ctx.getCurrentAST());
    }
    if (!((Result<IValue>)subscripts[0]).getType().isInteger()) {
      throw new UnexpectedType(getTypeFactory().integerType(),
          ((Result<IValue>)subscripts[0]).getType(), ctx.getCurrentAST());
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedSubscriptArity

  @Override
  @SuppressWarnings("unchecked")
  public <U extends IValue, V extends IValue> Result<U> subscript(Result<?>[] subscripts) {
    if (subscripts.length != 1) {
      throw new UnsupportedSubscriptArity(getType(), subscripts.length, ctx.getCurrentAST());
    }
    Result<IValue> key = (Result<IValue>) subscripts[0];
    if (!key.getType().isInteger()) {
      throw new UnexpectedType(TypeFactory.getInstance().integerType(), key.getType(), ctx.getCurrentAST());
    }
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.