[CLJ-1146] Symbol name starting with digits to defn throws "Unmatched delimiter )" Created: 13/Jan/13 Updated: 18/Apr/14
|Affects Version/s:||Release 1.5|
$java -jar clojure-1.5.0-RC2.jar
When trying to use an invalid symbol name when defining a function, the error message thrown is a confusing and wrong one. The error message is "RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:219)", which unfortunately is the only message seen in nrepled emacs.
$ java -jar clojure-1.5.0-RC2.jar
|Comment by Kevin Downey [ 18/Apr/14 2:27 AM ]|
this is an artifact of how streams and repls work.
when you type (defn 45fn  nil) and hit enter, the inputstream flushes and "(defn 45fn  nil)" is made available to the reader, the reader reads up to 45fn, throws an error back to the main repl loop, which prints out the error, then calls read, which still has the unread parts available to it " nil)"
changing this behavior would require significant changes to clojure's repl.
checkout https://github.com/trptcolin/reply instead