<< Back to previous view

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

Status: Open
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: Unresolved Votes: 0
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.


Generated at Mon Dec 22 18:20:34 CST 2014 using JIRA 4.4#649-r158309.