You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clojure's case form does not evaluate test constants. This trips folks up (CLJ-1367 and CLJ-1368) who expected case to evaluate symbols that indicate constants whose value the compiler knows. Eastwood could help by pointing out case test constants which, if evaluated, would also yield constants, the latter being perhaps what the programmer had intended for case to consider. For example, the following program ought to print 42.
(defn-main"I don't do a whole lot ... yet."
[& args]
(println
(let [a OutputKeys/DOCTYPE_SYSTEM]
(case a
OutputKeys/DOCTYPE_PUBLIC :oops
OutputKeys/DOCTYPE_SYSTEM 42;;else:oops))))
The text was updated successfully, but these errors were encountered:
Clojure's
case
form does not evaluate test constants. This trips folks up (CLJ-1367 and CLJ-1368) who expectedcase
to evaluate symbols that indicate constants whose value the compiler knows. Eastwood could help by pointing outcase
test constants which, if evaluated, would also yield constants, the latter being perhaps what the programmer had intended forcase
to consider. For example, the following program ought to print 42.The text was updated successfully, but these errors were encountered: