core.async

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

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    org.clojure/clojure "1.8.0"
    org.clojure/clojurescript "1.9.229"
    org.clojure/core.async "0.3.442"

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 )))))

Activity

Hide
Uwe Hubert added a comment -

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

Show
Uwe Hubert added a comment - Also fails with: org.clojure/clojure "1.8.0" org.clojure/clojurescript "1.9.671" org.clojure/core.async "0.3.443"
Hide
Kevin Downey added a comment -

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

Show
Kevin Downey added a comment - 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

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: