{"record":{"id":"826c1220bbd70a69","repo":"clojure/clojure","slug":"unknown-symbolic-value-826c12","errorCode":null,"errorMessage":"Unknown symbolic value: ##","messagePattern":"Unknown symbolic value: ##","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jvm/clojure/lang/LispReader.java","lineNumber":764,"sourceCode":"\t\treturn RT.map(a);\n\t}\n}\n\n\npublic static class SymbolicValueReader extends AFn{\n\n    static IPersistentMap  specials = PersistentHashMap.create(Symbol.intern(\"Inf\"), Double.POSITIVE_INFINITY,\n                                                               Symbol.intern(\"-Inf\"), Double.NEGATIVE_INFINITY,\n                                                               Symbol.intern(\"NaN\"), Double.NaN);\n\n\tpublic Object invoke(Object reader, Object quote, Object opts, Object pendingForms) {\n\t\tPushbackReader r = (PushbackReader) reader;\n\t\tObject o = read(r, true, null, true, opts, ensurePending(pendingForms));\n\n\t\tif (!(o instanceof Symbol))\n\t\t\tthrow Util.runtimeException(\"Invalid token: ##\" + o);\n\t\tif (!(specials.containsKey(o)))\n\t\t\tthrow Util.runtimeException(\"Unknown symbolic value: ##\" + o);\n\n\t\treturn specials.valAt(o);\n\t}\n}\n\npublic static class WrappingReader extends AFn{\n\tfinal Symbol sym;\n\n\tpublic WrappingReader(Symbol sym){\n\t\tthis.sym = sym;\n\t}\n\n\tpublic Object invoke(Object reader, Object quote, Object opts, Object pendingForms) {\n\t\tPushbackReader r = (PushbackReader) reader;\n\t\tObject o = read(r, true, null, true, opts, ensurePending(pendingForms));\n\t\treturn RT.list(sym, o);\n\t}\n","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/clojure/clojure/blob/f3b143341d6efc6428b523b2eaa099a6cc99156e/src/jvm/clojure/lang/LispReader.java#L746-L782","documentation":"Sentinel in LispReader's SymbolicValueReader: the symbol following ## must be Inf, -Inf, or NaN; anything else has no entry in the specials map and reading fails. At-fault input: an unknown symbolic constant such as ##Infinity or ##foo.","triggerScenarios":"Reading ##Infinity, ##inf, ##Foo, or any symbol other than the three recognized specials after the ## dispatch prefix.","commonSituations":"Typing ##Infinity expecting it to work like ##Inf; trying to define custom ## symbols; confusion between ##Inf and Double/POSITIVE_INFINITY in other languages.","solutions":["Use the exact spellings ##Inf, ##-Inf, or ##NaN","Spell out alternatives in code instead: (Double/POSITIVE_INFINITY) or (/ 1.0 0.0) for infinity","Remove ## where a regular symbol was intended"],"exampleFix":"// before\n(def x ##Infinity)\n// after\n(def x ##Inf)","handlingStrategy":"validation","validationCode":"(def valid-specials #{\"##Inf\" \"##-Inf\" \"##NaN\"})\n(defn known-special? [s] (contains? valid-specials s))","typeGuard":null,"tryCatchPattern":"(try (read-string s)\n  (catch Exception e\n    (throw (ex-info \"Unknown ## symbolic value\" {:input s} e))))","preventionTips":["Memorize the three supported specials: Inf, -Inf, NaN","Use ##Inf (not ##Infinity)","For other constants use vars or data readers"],"tags":["clojure","reader","syntax"],"backgroundTag":"invalid-enum-value","analyzedSha":"f3b143341d6efc6428b523b2eaa099a6cc99156e","analyzedAt":"2026-09-09T12:04:58.961Z","contentChangedAt":"2026-09-09T12:04:58.961Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}