Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Kevin Downey
On Dec 20, 2011 12:48 PM, "David Nolen" wrote: > > On Tue, Dec 20, 2011 at 3:05 PM, Brian Marick wrote: >> >> >> On Dec 20, 2011, at 12:11 PM, David Nolen wrote: >> >> > Just make sure if you are attach :line metadata that you wrap with (Integer. n) >> >> That works. Thanks again. >> >> Given th

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread David Nolen
On Tue, Dec 20, 2011 at 3:05 PM, Brian Marick wrote: > > On Dec 20, 2011, at 12:11 PM, David Nolen wrote: > > > Just make sure if you are attach :line metadata that you wrap with > (Integer. n) > > That works. Thanks again. > > Given that: > > > (fact (type (inc (Integer. 0))) => java.lang.Long

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
On Dec 20, 2011, at 12:11 PM, David Nolen wrote: > Just make sure if you are attach :line metadata that you wrap with (Integer. > n) That works. Thanks again. Given that: > (fact (type (inc (Integer. 0))) => java.lang.Long ... would it be reasonable to ask that the compiler (or something)

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
On Dec 20, 2011, at 12:11 PM, David Nolen wrote: > If you look at the Compiler.java at the specified line in the exception it > shouldn't be too hard to see what's going on. The Compiler looks for :line in > the metadata on the form. In 1.3 literals are long so it seems likely that > Longs are

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread David Nolen
If you look at the Compiler.java at the specified line in the exception it shouldn't be too hard to see what's going on. The Compiler looks for :line in the metadata on the form. In 1.3 literals are long so it seems likely that Longs are being attached to the form. Just make sure if you are attach

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
On Dec 20, 2011, at 11:44 AM, David Nolen wrote: > Are you attaching line metadata yourself? Yes... What type should it be? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this me

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread David Nolen
Are you attaching line metadata yourself? David On Mon, Dec 19, 2011 at 8:34 PM, Brian Marick wrote: > I have tried for two days to figure out what is causing the compiler to > throw the following when compiling a macro: > > Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-19 Thread Brian Marick
On Dec 19, 2011, at 7:34 PM, Brian Marick wrote: > I have tried for two days to figure out what is causing the compiler to throw > the following when compiling a macro: > > Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to > java.lang.Integer > at clojure.lang.Com

Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-19 Thread Brian Marick
I have tried for two days to figure out what is causing the compiler to throw the following when compiling a macro: Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at clojure.lang.Compiler.analyzeSeq(Compiler.java:6390) at clojure.lang.