Created
January 17, 2023 15:22
-
-
Save mk/d8f60f0b13bf6a63c6afc89d6f7e7565 to your computer and use it in GitHub Desktop.
Revisions
-
mk created this gist
Jan 17, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ {:paths ["."] :deps {org.clojure/tools.analyzer {:mvn/version "1.1.0"} org.clojure/tools.analyzer.jvm {:mvn/version "1.1.0"}}} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ $ clj -M repro.clj :hash-code/before 308316550 :hash-code/after 1108589630 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ (ns repro (:require [clojure.tools.analyzer.jvm :as ana-jvm])) (defrecord MyRecord [form]) (prn :hash-code/before (.hashCode MyRecord)) (do (let [form '(defrecord MyRecord [form])] (ana-jvm/analyze form (ana-jvm/empty-env) {})) :analyzed) (prn :hash-code/after (.hashCode MyRecord))