_Comment made by: bronsa_
One way to trigger this is to copy the macroexpanded code from manually. This forces the literal to be read as a normal map rather than a sorted map.
user=> (clojure.core/let
[G__8112 :a]
(case*
G__8112
0
31
(throw
(java.lang.IllegalArgumentException.
(clojure.core/str "No matching clause: " G__8112)))
{3 [:b-36 36],
4 [:b-37 37],
6 [:b-40 40],
13 [:b-39 39],
14 [:b-38 38],
18 [:a-42 42],
20 [:a-40 40],
21 [:a-38 38],
22 [:a-37 37],
24 [:a-39 39],
27 [:b-42 42],
28 [:a-36 36]}
:compact
:hash-identity
nil))
Syntax error (NegativeArraySizeException) compiling fn* at (REPL:1:1).
null
I would not consider this a bug: the contract of the `case*` special form requires the map to be sorted, if there's any bug at all it's upstream, in whatever code is responsible for traversing and transforming the macroexpanded form and converting the sorted map into a regular map.
This has caught me offguard a few times in the past, my proposal (as implemented in the attached patch) is to simply add a check at analysis time and throw if the map is not sorted.