Set of mutable binding in protocol fn fails when embedded in a locking expression


Consider the following code:

Works fine on ClojureJVM.
In ClojureCLR, {{T1 }}and {{T3 }}are okay, but {{T2 }}gets an error that value is not mutable.
For some reason, the {{locking }}construct establishes a boundary where {{value }}is not seen as a local field.




David Miller
January 23, 2021, 5:07 AM

The problem was a bad passed parameter in a special case in TryExpr.Parse. That error has been sitting there for 8.5 years.

Commit f33cf1a8, 2021.01.22.

David Miller
January 21, 2021, 8:19 PM

This works in Clojure 1.8, but will fail in Clojure 1.10. The difference is that locking in Clojure 1.10 introduces a doubly nested try. If you do a doubly nested try in Clojure 1.8, it will also fail.


Compare T4 and T5. In Clojure 1.8 T4 fails, but T5 succeeds.

Your pinned fields
Click on the next to a field label to start pinning.


David Miller


David Miller