(CLJS) A "finally" including an "if" breaks the result of the enclosing "try" if the "try" is in a "go" block

Description

If there is a "if" in a "finally" block and the enclosing "try" is in a CLJS "go" block, then the result of the "try" is always nil.

Example code:

(ns demo
(:require-macros
[cljs.core.async.macros :refer [go]]))

;; Prints: "in a try"
(println (try "in a try" (finally (if true nil ))))

;; Prints: "in a try"
(go (println (try "in a try" (finally nil))))

;; Prints: nil
(go (println (try "in a try" (finally (if true nil )))))

Environment

org.clojure/clojure "1.8.0"
org.clojure/clojurescript "1.9.229"
org.clojure/core.async "0.3.442"

Activity

Show:
import
July 13, 2017, 11:16 AM

Comment made by: hubert

Also fails with:
org.clojure/clojure "1.8.0"
org.clojure/clojurescript "1.9.671"
org.clojure/core.async "0.3.443"

Kevin Downey
July 13, 2017, 8:44 PM

this is likely a result of the brokeness in the try/catch handling in go blocks that should be fixed with https://dev.clojure.org/jira/browse/ASYNC-184

David Nolen
March 31, 2020, 6:49 PM
Alex Miller
March 31, 2020, 7:54 PM

Released in core.async 1.1.582

Fixed

Assignee

Unassigned

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Major
Configure