<< Back to previous view

[ASYNC-155] Preserve loop binding metadata when inside a go block Created: 15/Dec/15  Updated: 21/Oct/16

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

Type: Defect Priority: Major
Reporter: Nicola Mometto Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None

Attachments: Text File 0001-ASYNC-155-preserve-loop-binding-metadata.patch    
Patch: Code
Approval: Triaged


Currently this causes a reflection warning because core.async loses the type hint on the binding:

(go (loop* [^String foo "foo"](.substring foo 0) (<!) (recur nil)))
Reflection warning, /tmp/form-init2119477256040974630.clj:1:1 - call to method substring can't be resolved (target class is unknown).

This is a problem since macros like `doseq` expand to similar code and cause reflection warnings

The attached patch preserves that metadata and removes the reflection warning

Patch: 0001-ASYNC-155-preserve-loop-binding-metadata.patch

Comment by Marcus Crestani [ 04/Jan/16 3:17 AM ]

I can confirm that this patch also fixes ASYNC-157. Thanks!

Comment by Marcus Crestani [ 21/Oct/16 7:08 AM ]

Can this patch be included in a next release of core.async?

Generated at Sat Oct 22 18:54:49 CDT 2016 using JIRA 4.4#649-r158309.