code: private void visitCall(NodeTraversal t, Node n) {
      checkCallConventions(t, n);
  
      Node child = n.getFirstChild();
      JSType childType = getJSType(child).restrictByNotNullOrUndefined();
  
      if (!childType.canBeCalled()) {
        report(n, NOT_CALLABLE, childType.toString());
        ensureTyped(n);
        return;
      }
  
      // A couple of types can be called as if they were functions.
      // If it is a function type, then validate parameters.
      if (childType.isFunctionType()) {
        FunctionType functionType = childType.toMaybeFunctionType();
  
        // Non-native constructors should not be called directly
        // unless they specify a return type
        if (functionType.isConstructor()
            && !functionType.isNativeObjectType()
            && (functionType.getReturnType().isUnknownType()
                || functionType.getReturnType().isVoidType())
            && !n.getFirstChild().isSuper()) {
          report(n, CONSTRUCTOR_NOT_CALLABLE, childType.toString());
        }
  
        // Functions with explicit 'this' types must be called in a GETPROP or GETELEM.
        if (functionType.isOrdinaryFunction() && !NodeUtil.isGet(child)) {
          JSType receiverType = functionType.getTypeOfThis();
          if (receiverType.isUnknownType()
              || receiverType.isAllType()
              || receiverType.isVoidType()
              || (receiverType.isObjectType() && receiverType.toObjectType().isNativeObjectType())) {
            // Allow these special cases.
          } else {
            report(n, EXPECTED_THIS_TYPE, functionType.toString());
          }
        }
  
        visitArgumentList(n, functionType);
        ensureTyped(n, functionType.getReturnType());
      } else {
        ensureTyped(n);
      }
  
      // TODO(nicksantos): Add something to check for calls of RegExp objects,
      // which is not supported by IE. Either say something about the return type
      // or warn about the non-portability of the call or both.
    }
docs: Visits a CALL node.
  
  @param t The node traversal object that supplies context, such as the
  scope chain to use in name lookups as well as error reporting.
  @param n The node being visited.