nextjournal / clerk

⚡️ Moldable Live Programming for Clojure
https://clerk.vision
ISC License
1.74k stars 75 forks source link

Inline redefs crash during eval #634

Closed zampino closed 4 months ago

zampino commented 5 months ago
(ns scratch.repro)

(def a 1)

(def a (inc a))

crashes with class clojure.lang.Var$Unbound cannot be cast to class java.lang.Number. The first def is not evaluated at all since the second definition overrides the first in the analysis-info map at key scratch.repro/a.

zampino commented 5 months ago

Similar failure with the code:

(def a 1)

(inc a)

(def a :boom)