core.async

go macro interferes with macros that use &env

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

(defmacro locals-test []
  (if (get &env 'x)
    :works
    :sad-panda))

(let [x 1]
  (locals-test)) ;; :works

(<!! (go
       (let [x 1]
         (locals-test)))) ;; :sad-panda

Activity

David Nolen made changes -
Field Original Value New Value
Description {code}
(defmacro locals-test []
  (if (get &env 'x)
    :works
    :sad-panda))

(let [x 1]
  (locals-test)) ;; :works

(<!!(go
      (let [x 1]
        (locals-test)))) ;; :sad-panda
{code}
{code}
(defmacro locals-test []
  (if (get &env 'x)
    :works
    :sad-panda))

(let [x 1]
  (locals-test)) ;; :works

(<!! (go
       (let [x 1]
         (locals-test)))) ;; :sad-panda
{code}
Timothy Baldridge made changes -
Resolution Completed [ 1 ]
Assignee Rich Hickey [ richhickey ] Timothy Baldridge [ halgari ]
Status Open [ 1 ] Resolved [ 5 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: