<< Back to previous view

[ASYNC-22] IOC macro does not handle Dot special form Created: 09/Sep/13  Updated: 04/Oct/13  Resolved: 04/Oct/13

Status: Resolved
Project: core.async
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Ben Mabey Assignee: Timothy Baldridge
Resolution: Completed Votes: 0
Labels: None

I've tested with using the latest snapshot of core.async and latest on github.


This code:

(go (. clojure.lang.Numbers (add 1 2)))

Results in this error:

CompilerException java.lang.RuntimeException: Unable to resolve symbol: add in this context, ...

Looking at the expansion of the state machine the problem seems to be that SSA transformation is treating the (add 1 2) as a separate expression that needs to be evaluated (and assigned) before the clojure.lang.Numbers:

(clojure.core/let [inst_4648 (add 1 2)
                   inst_4649 (. clojure.lang.Numbers inst_4648)
                   state_4651 state_4651]

The newer / form works fine, e.g. (Math/abs -2), and that is how I would write static method calls myself but I am using macros that expand to the older dot syntax above.

Do you see this as a case the IOC macro should be handling?

Comment by Timothy Baldridge [ 04/Oct/13 1:42 PM ]

Fixed in master

Generated at Sun Oct 22 19:55:06 CDT 2017 using JIRA 4.4#649-r158309.