如果“finally”块中有“if”,且封装的“try”在CLJS的“go”块中,那么“try”的结果总是nil。
示例代码
(ns demo)
(:require-macros
(link: cljs.core.async.macros :refer [go]))
;; 打印: "in a try"
(println (try "in a try" (finally (if true nil ))))
;; 打印: "in a try"
(go (println (try "in a try" (finally nil))))
;; 打印: nil
(go (println (try "in a try" (finally (if true nil )))))