jvm.tools.analyzer

:required-params and :rest-param not included in children

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Clojure 1.4.1, jvm.tools.analyzer 0.5.2

Description

Consider this example:

user=> (pprint (ast (fn [x] x) {:children true}))
{:children [[[:methods] {:exprs? true}]],
 :op :fn-expr,
 :env {:line 53, :locals {}, :ns {:name user}},
 :methods
 ({:children [[[:body] {}]],
   :op :fn-method,
   :env {:locals {}, :ns {:name user}},
   :body
   {:children [[[:exprs] {:exprs? true}]],
    :op :do,
    :env {:locals {}, :ns {:name user}},
    :exprs
    ({:children [[[:local-binding] {}]],
      :op :local-binding-expr,
      :env {:locals {}, :ns {:name user}},
      :local-binding
      {:children [[[:init] {}]],
       :op :local-binding,
       :env {:locals {}, :ns {:name user}},
       :sym x,
       :tag nil,
       :init nil},
      :tag nil})},
   :required-params
   ({:children [[[:init] {}]],
     :op :local-binding,
     :env {:locals {}, :ns {:name user}},
     :sym x,
     :tag nil,
     :init nil}),
   :rest-param nil}),
 :variadic-method nil,
 :tag nil}

I would expect :required-params (and :rest-param) to be included in the :children list of the :fn-method node.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: