Skip to:
Simplest case:
Functions should be able to mutate mutable fields in their surrounding deftype (just like inner classes do in Java).
Filed as bug, because the loop special form expands into a fn form sometimes:
Dupe of https://clojure.atlassian.net/browse/CLJ-2743
CLJ-701 could probably make the loop case working
Related tickets: CLJ-1075 CLJ-1023
The patch for CLJ-1226 makes this work:
If there's interest, I could provide a patch that converts closed over mutable field access by generated fns (for loop/try) into field access on closed over "this", i.e. val -> (.val this)
Comment made by: importer
Converted from http://www.assembla.com/spaces/clojure/tickets/274
Simplest case:
Functions should be able to mutate mutable fields in their surrounding deftype (just like inner classes do in Java).
Filed as bug, because the loop special form expands into a fn form sometimes: