We're updating the issue view to help you get more done. 

Case macro expansion evaluates expression twice

Description

The value being checked is evaluated twice if all of the test values are keywords.

1 (macroexpand-1 '(case (expensive) :a 1 2))
1 2 (cljs.core/let [G__123555 (if (cljs.core/keyword? (expensive)) (.-fqn (expensive)) nil)] (case* G__123555 [["a"]] [1] 2))

Environment

The issue is present in version 1.7.189.

Status

Assignee

David Nolen

Reporter

Darrick Wiebe

Labels

None

Approval

None

Patch

Code and Test

Affects versions

1.7.228
1.7.145

Priority

Minor