Re: I've found a constellation of related bugs in primitive function support when type-hinting *return types*.

2016-08-09 Thread Sean Corfield
I can’t reproduce any of this on Clojure 1.9.0 Alpha 10 – it all works exactly as expected. On 8/9/16, 2:50 PM, "Fluid Dynamics" wrote: => (defn foo [x] (doto (double-array 1) (aset 0 x))) => [(foo 3.0) (type (foo 3.0))] [[3.0]

Re: I've found a constellation of related bugs in primitive function support when type-hinting *return types*.

2016-08-09 Thread Alex Miller
What Clojure version are you using? On Tuesday, August 9, 2016 at 5:01:21 PM UTC-5, Fluid Dynamics wrote: > > => (defn foo [x] (doto (double-array 1) (aset 0 x))) > => [(foo 3.0) (type (foo 3.0))] > [[3.0] [D] ; As expected, a double array with the value passed in. > ; Maybe a good idea to hint

Re: I've found a constellation of related bugs in primitive function support when type-hinting *return types*.

2016-08-09 Thread Timothy Baldridge
It's impossible to read what you've written here. Can you give us a minimum failing use case? Thanks. Timothy On Tue, Aug 9, 2016 at 3:50 PM, Fluid Dynamics wrote: > => (defn foo [x] (doto (double-array 1) (aset 0 x))) > => [(foo 3.0) (type (foo 3.0))] > [[3.0] [D] ; As

I've found a constellation of related bugs in primitive function support when type-hinting *return types*.

2016-08-09 Thread Fluid Dynamics
=> (defn foo [x] (doto (double-array 1) (aset 0 x))) => [(foo 3.0) (type (foo 3.0))] [[3.0] [D] ; As expected, a double array with the value passed in. ; Maybe a good idea to hint this function as always returning a double array. => (defn foo ^doubles [x] (doto (double-array 1) (aset 0 x)))