Package org.rascalmpl.interpreter.staticErrors

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredType


        for (int i = 0; i < args.size(); i++) {
          TypeArg arg = args.get(i);
          fields[i] = arg.getType().typeOf(env, true, eval);

          if (fields[i] == null) {
            throw new UndeclaredType(arg.hasName() ? Names.name(arg.getName()) : "?", arg);
          }

          if (arg.hasName()) {
            labels[i] = Names.name(arg.getName());
          } else {
View Full Code Here


      else {
        int index = nodeType.getFieldIndex(name);
        return makeResult(nodeType.getFieldType(index), getValue().get(index), ctx);
      }
    } catch (UndeclaredAbstractDataTypeException e) {
      throw new UndeclaredType(getType().toString(), ctx.getCurrentAST());
    }
  }
View Full Code Here

      } else {
        adt = env.lookupAbstractDataType(name);
      }

      if (adt == null) {
        throw new UndeclaredType(name, this);
      }

      String constructor = org.rascalmpl.interpreter.utils.Names
          .name(this.getProduction());
      Set<Type> constructors = env.lookupConstructor(adt, constructor);

      if (constructors.size() == 0) {
        throw new UndeclaredType(name + "." + constructor, this);
      } else if (constructors.size() > 1) {
        throw new AmbiguousFunctionReference(name + "."
            + constructor, this);
      } else {
        return constructors.iterator().next();
View Full Code Here

        if (symbol != null) {
          return symbol;
        }
      }

      throw new UndeclaredType(name, this);

    }
View Full Code Here

        // environment (generally meaning we are inside a function with
        // type parameters, and those parameters are now bound to real types)
        return type.instantiate(bindings).instantiate(__eval.getTypeBindings());
      }

      throw new UndeclaredType(name, this);

    }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.staticErrors.UndeclaredType

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.