<< Back to previous view

[JVMTA-2] :required-params and :rest-param not included in children Created: 17/Nov/13  Updated: 19/Jul/15  Resolved: 19/Jul/15

Status: Closed
Project: jvm.tools.analyzer
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Miikka Koskinen Assignee: Ambrose Bonnaire-Sergeant
Resolution: Declined Votes: 0
Labels: None

Clojure 1.4.1, jvm.tools.analyzer 0.5.2


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}},
 ({:children [[[:body] {}]],
   :op :fn-method,
   :env {:locals {}, :ns {:name user}},
   {:children [[[:exprs] {:exprs? true}]],
    :op :do,
    :env {:locals {}, :ns {:name user}},
    ({:children [[[:local-binding] {}]],
      :op :local-binding-expr,
      :env {:locals {}, :ns {:name user}},
      {:children [[[:init] {}]],
       :op :local-binding,
       :env {:locals {}, :ns {:name user}},
       :sym x,
       :tag nil,
       :init nil},
      :tag nil})},
   ({: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.

Comment by Ambrose Bonnaire-Sergeant [ 19/Jul/15 9:05 AM ]

jvm.tools.analyzer is now deprecated.

Generated at Thu Jan 18 18:07:31 CST 2018 using JIRA 4.4#649-r158309.