如果“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 )))))