We're updating the issue view to help you get more done. 

Direct field access for keyword lookup on records

Description

If, via type inference, we know that a keyword is being used to lookup a field in a record, convert this to direct field access.

Example:

1 2 3 4 5 6 7 8 9 10 11 12 cljs.user=> (defrecord Foo [abcd efg]) cljs.user/Foo cljs.user=> (def x (->Foo 1 2)) #'cljs.user/x cljs.user=> (:abcd x) 1 cljs.user=> (set! *print-fn-bodies* true) true cljs.user=> (fn [] (:abcd x)) #object[ret__8748__auto__ "function (){ return cljs.user.x.abcd; }"]

Environment

None

Status

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

Approval

Accepted

Patch

Code and Test

Priority

Major