Permalink
Browse files

Fix CTYP-78

Expected type for finally
  • Loading branch information...
frenchy64 committed Oct 6, 2013
1 parent 88a6e86 commit 20b1682f68733d657bf1984b8dd997a00228bb63
@@ -4883,7 +4883,7 @@
(let [ctry-expr (check try-expr expected)
ccatch-exprs (mapv #(check % expected) catch-exprs)
_cfinally-expr_ (when finally-expr
- (check finally-expr expected))]
+ (check finally-expr))]
(assoc expr
expr-type (ret (apply c/Un (-> ctry-expr expr-type ret-t)
(map (comp ret-t expr-type) ccatch-exprs))))))
@@ -2351,6 +2351,9 @@
(deftest CTYP-84-hlist-ancestor-test
(is-cf (seq '(1)) (clojure.core.typed/NonEmptySeq Number)))
+(deftest CTYP-78-finally-expected-test
+ (is (check-ns 'clojure.core.typed.test.finally)))
+
;(reset-caches)
;(chk/abstract-result
@@ -0,0 +1,8 @@
+(ns clojure.core.typed.test.finally
+ (:require [clojure.core.typed :refer :all]))
+
+(ann f [-> String])
+(defn f []
+ (try
+ "a"
+ (finally 1)))

0 comments on commit 20b1682

Please sign in to comment.