From b93d6b3acd76561e6e1b53459d7a218371f6863e Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 13 Oct 2026 13:30:33 +0200 Subject: [PATCH] Remove redundant one-argument `hash(::TrackedReal)` method It matches what Base's `hash(x) = hash(x, HASH_SEED)` fallback already does through the two-argument method, and invalidates `hash(::Any)` callers (e.g. `Dict` rehashing) on package load. Co-Authored-By: Claude Opus 5.5 --- src/tracked.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tracked.jl b/src/tracked.jl index d28d3c98..d9babb5f 100644 --- a/src/tracked.jl +++ b/src/tracked.jl @@ -430,7 +430,6 @@ reshape_body = :(TrackedArray(reshape(value(t), dims), reshape(deriv(t), dims), # `Real` Interface # #################### -Base.hash(t::TrackedReal) = hash(value(t)) Base.hash(t::TrackedReal, hsh::UInt64) = hash(value(t), hsh) Base.deepcopy(t::T) where {T <: TrackedReal} = t