<< Back to previous view

[CLJ-732] (keyword "") can be printed, but not read Created: 26/Jan/11  Updated: 26/Aug/16  Resolved: 29/Jul/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.2
Fix Version/s: Backlog

Type: Defect Priority: Minor
Reporter: Zach Tellman Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None

Attachments: File clj-732.diff    
Approval: Incomplete
Waiting On: Rich Hickey


user=> (keyword "")
user=> (prn-str *1)
user=> (read-string *1)
java.lang.RuntimeException: java.lang.Exception: Invalid token: : (NO_SOURCE_FILE:0)

This obviously isn't a huge defect, but I'd argue that anything that can be printed should be readable.

Comment by Stuart Halloway [ 28/Jan/11 9:06 AM ]

Patch that throws IllegalArgumentException would be ok for this.

Comment by Stuart Halloway [ 05/Apr/11 8:57 PM ]

After a brief review of places that call intern, it appears that this problem might never be reached in the reader, only in user code calling (keyword ...). Does it make more sense to have the patch there, and a matching change for (symbol ...)?

Comment by David Smith [ 26/Aug/16 5:03 AM ]

I have cloned this at http://dev.clojure.org/jira/browse/CLJ-2014 as I came up against this problem. It was quite hard to track down.

Generated at Mon Jan 22 10:19:53 CST 2018 using JIRA 4.4#649-r158309.