Created
January 17, 2023 15:22
-
-
Save mk/d8f60f0b13bf6a63c6afc89d6f7e7565 to your computer and use it in GitHub Desktop.
tools.analyzer hashCode change
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 characters
{: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 characters
$ 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 characters
(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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment