Fork me on GitHub

Hi. I already asked this question a while ago but this is pretty annoying and I want to be sure there's not a hidden feature I'm unaware of. Basically I'm writing a macro that emits aset exprs to put arbitrary values into an object array. The problem is when values happen to be inferred as primitives, emitted code makes the compiler complain about reflection with warnings like "call to static method aset on clojure.lang.RT can't be resolved (argument types: [Ljava.lang.Object;, int, long)." So what I need is way to tell the compiler to ensure a given value will be boxed to fit in an object container. I'm about to implement this in my macro based on analyzer information but it feels kind of the wrong place to do that


ok thanks @hiredman. that looks suboptimal to me but at least I have my answer.


@ghadi thanks for the edit :)