Clojure

#^:dynamic vars declared in a nested form are not immediately dynamic

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.3, Release 1.4
  • Fix Version/s: Release 1.4
  • Component/s: None
  • Labels:
    None
  • Environment:
    All
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

http://groups.google.com/group/clojure/browse_thread/thread/890202da5db0fe1/e34819de71c6ea24?hl=en&lnk=gst&q=micah#e34819de71c6ea24

The following snippet throws an error stating that p is unbound.

(list
(declare ^:dynamic p)
(defn q [] @p))
(binding [p (atom 10)]
(q))

Activity

Micah Martin made changes -
Field Original Value New Value
Description The following snippet throws an error stating that p is unbound.

(list
  (declare ^:dynamic p)
  (defn q [] @p))
(binding [p (atom 10)]
  (q))
http://groups.google.com/group/clojure/browse_thread/thread/890202da5db0fe1/e34819de71c6ea24?hl=en&lnk=gst&q=micah#e34819de71c6ea24

The following snippet throws an error stating that p is unbound.

(list
  (declare ^:dynamic p)
  (defn q [] @p))
(binding [p (atom 10)]
  (q))
Micah Martin made changes -
Attachment micah_testing_876.diff [ 10704 ]
Patch Code and Test [ 10002 ]
Stuart Halloway made changes -
Approval Screened [ 10004 ]
Stuart Halloway made changes -
Priority Major [ 3 ] Minor [ 4 ]
Issue Type Defect [ 1 ] Enhancement [ 4 ]
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: