Examples of FunctionTypeAliasElement


Examples of com.google.dart.engine.element.FunctionTypeAliasElement

   * @param node the function type alias to evaluate
   * @return {@code true} if and only if an error code is generated on the passed node
   * @see CompileTimeErrorCode#TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
   */
  private boolean checkForTypeAliasCannotReferenceItself_function(FunctionTypeAlias node) {
    FunctionTypeAliasElement element = node.getElement();
    if (!hasTypedefSelfReference(element)) {
      return false;
    }
    errorReporter.reportErrorForNode(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node);
    return true;
View Full Code Here

Examples of com.google.dart.engine.element.FunctionTypeAliasElement

    }
  }

  @Override
  public Void visitFunctionTypeAlias(FunctionTypeAlias node) {
    FunctionTypeAliasElement outerAlias = enclosingAlias;
    try {
      SimpleIdentifier aliasName = node.getName();
      enclosingAlias = findIdentifier(enclosingUnit.getFunctionTypeAliases(), aliasName);
      processElement(enclosingAlias);
      return super.visitFunctionTypeAlias(node);
View Full Code Here

Examples of com.google.dart.engine.element.FunctionTypeAliasElement

    ClassElement definingClass = element.getAncestor(ClassElement.class);
    if (definingClass != null) {
      aliasElement.shareTypeParameters(definingClass.getTypeParameters());
      type.setTypeArguments(definingClass.getType().getTypeArguments());
    } else {
      FunctionTypeAliasElement alias = element.getAncestor(FunctionTypeAliasElement.class);
      while (alias != null && alias.isSynthetic()) {
        alias = alias.getAncestor(FunctionTypeAliasElement.class);
      }
      if (alias != null) {
        aliasElement.setTypeParameters(alias.getTypeParameters());
        type.setTypeArguments(alias.getType().getTypeArguments());
      } else {
        type.setTypeArguments(TypeImpl.EMPTY_ARRAY);
      }
    }
    element.setType(type);
View Full Code Here

Examples of com.google.dart.engine.element.FunctionTypeAliasElement

    }
  }

  @Override
  public Void visitFunctionTypeAlias(FunctionTypeAlias node) {
    FunctionTypeAliasElement outerAlias = enclosingAlias;
    try {
      SimpleIdentifier aliasName = node.getName();
      enclosingAlias = findIdentifier(enclosingUnit.getFunctionTypeAliases(), aliasName);
      return super.visitFunctionTypeAlias(node);
    } finally {
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.