Comment made by: hiredman
this must be the same issue as CLJ-1422 and CLJ-701, it has nothing to do with returning this
, but with the try being in a tail position or not. if the try is not in a tail position the compiler hoists it out in to a thunk. effectively the code is
(deftype SomeType [^:volatile-mutable foo]
SomeProtocol
(someFn [_] ((fn [] (try (set! foo 1))))))
which the compiler also rejects, because it doesn't let you mutate fields from functions that are not the immediate protocol functions