Skip to content

Commit cbc70e7

Browse files
committed
addresses #1 an edge case with inline predicates
Signed-off-by: Sean Corfield <[email protected]>
1 parent f0e59b9 commit cbc70e7

File tree

1 file changed

+7
-4
lines changed
  • resources/clj-kondo.exports/org.clj-commons/slingshot/clj_kondo/clj_commons

1 file changed

+7
-4
lines changed

resources/clj-kondo.exports/org.clj-commons/slingshot/clj_kondo/clj_commons/slingshot.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
(let [[v & exprs] exprs]
1818
(api/list-node
1919
(list* catch (api/token-node 'Exception) v
20-
(api/list-node
21-
(list (api/token-node 'fn)
22-
(api/vector-node [(api/token-node '%)])
23-
catchee))
20+
(if (or (= 'fn (first catchee-sexpr))
21+
(= 'fn* (first catchee-sexpr)))
22+
catchee
23+
(api/list-node
24+
(list (api/token-node 'fn)
25+
(api/vector-node [(api/token-node '%)])
26+
catchee)))
2427
exprs)))
2528
:else catch-node)))
2629

0 commit comments

Comments
 (0)