<< Back to previous view

[TRDR-22] :column metadata for sets should be an int Created: 27/Mar/15  Updated: 27/Mar/15  Resolved: 27/Mar/15

Status: Closed
Project: tools.reader
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Michael Griffiths Assignee: Nicola Mometto
Resolution: Completed Votes: 0
Labels: None

Clojure 1.5.0 / Clojure 1.5.1
Java 1.8.0_05

Attachments: Text File 0001-TRDR-22-column-metadata-for-sets-should-be-an-int.patch    
Patch: Code

(->> "#{1 2 3 4}"
     (map #(vector (key %) (val %) (type (val %)))))

([:end-column 11 java.lang.Integer]
 [:end-line 1 java.lang.Integer]
 [:column 1 java.lang.Long]
 [:line 1 java.lang.Integer])

Trying to eval the result of the above causes the compiler to throw: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer. This only affects Clojure 1.5.0 and Clojure 1.5.1.

The attached patch, {{0001-TRDR-22-column-metadata-for-sets-should-be-an-int.patch}}, adds a call to int in read-set to ensure that the :column metadata is an int.

Comment by Nicola Mometto [ 27/Mar/15 2:21 PM ]

Thanks https://github.com/clojure/tools.reader/commit/273b8ae83a0b8ce2ca68005405948730686199ae

Generated at Sat Mar 28 00:23:47 CDT 2015 using JIRA 4.4#649-r158309.