The same thing happens in Clojure:
(defmacro silly [object pat1 body1 pat2 body2]
`(case (:tag ~object)
~pat1 ~body1
~body2))
(def out (java.io.StringWriter.))
(defn log [& args]
(doseq [arg args]
(.write out (str arg))
(.write out "\n")))
(defn init []
(silly {:tag :dog}
:dog (log "without-go: woof woof")
cat (log "without-go: unrecognized"))
(async/go
(silly {:tag :dog}
:dog (log "with-go: woof woof")
cat (log "with-go: unrecognized"))))
(init)
(print (str out))
without-go: woof woof
with-go: woof woof
with-go: unrecognized
nil
Cheers,
Michał
On 18 February 2014 01:01, t x <[email protected]> wrote:
> Thanks for verifying!
>
> @tbaldridge: can you enlighten us on if:
>
> * I'm doing something stupid or
> * this is an actual bug in cljs/core.async?
>
> Thanks!
>
> On Mon, Feb 17, 2014 at 2:10 PM, Manuel Paccagnella
> <[email protected]> wrote:
>> Tested on Linux x64, Chromium 31.0.1650.63 and Firefox 26.0. Same behaviour
>> that you have seen. However, I haven't looked at the code yet.
>>
>> Il giorno lunedì 17 febbraio 2014 20:34:22 UTC+1, t x ha scritto:
>>>
>>> Can anyone verify whether this bug is reproducible?
>>>
>>> On Mon, Feb 17, 2014 at 12:28 AM, t x <[email protected]> wrote:
>>> > Hi,
>>> >
>>> > repo: https://github.com/txrev319/bug-report
>>> >
>>> > I have a really weird bug where:
>>> >
>>> > * (my-macro ...) ==> everything works
>>> >
>>> > * (async/go (my-macro ...)) ==> something weird happens
>>> >
>>> >
>>> > A minimal failure case is documented at:
>>> > https://github.com/txrev319/bug-report/blob/master/src/app.cljx
>>> >
>>> > It depends on the macro defined in:
>>> > https://github.com/txrev319/bug-report/blob/master/src/macros.cljx
>>> >
>>> > The bug can be replicated by following the instructions at:
>>> > https://github.com/txrev319/bug-report/blob/master/README.md
>>> >
>>> > I *believe* I have included everything required to replicate the
>>> > bug. If I am missing anything, please let me know.
>>> >
>>> >
>>> > Extra info:
>>> >
>>> > $ lein --version
>>> > Leiningen 2.2.0 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
>>> >
>>> > I'm on 64-bit OSX.
>>> >
>>> >
>>> > Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to [email protected]
>> Note that posts from new members are moderated - please be patient with your
>> first post.
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.