code: private boolean validTemplateTypeExpression(Node expr) {
      // The expression must have at least three children the type keyword,
      // a type name (or type variable) and a type expression
      if (!checkParameterCount(expr, Keywords.TYPE)) {
        return false;
      }
      int paramCount = getCallParamCount(expr);
      // The first parameter must be a type variable or a type name
      Node firstParam = getCallArgument(expr, 0);
      if (!isTypeVar(firstParam) && !isTypeName(firstParam)) {
        warnInvalid("type name or type variable", expr);
        warnInvalidInside("template type operation", expr);
        return false;
      }
      // The rest of the parameters must be valid type expressions
      for (int i = 1; i < paramCount; i++) {
        if (!validTypeTransformationExpression(getCallArgument(expr, i))) {
          warnInvalidInside("template type operation", expr);
          return false;
        }
      }
      return true;
    }
docs: A template type expression must be of the form type(typename, TTLExp,...)
  or type(typevar, TTLExp...)