File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ function (::Type{Sym{T}})(name; metadata=NO_METADATA) where {T}
149149 Sym {T, typeof(metadata)} (name, metadata)
150150end
151151
152- Base. hash (s:: Sym{T} , u:: UInt ) where {T} = hash (T, hash ( s. name, u) )
152+ Base. hash (s:: Sym , u:: UInt ) = hash (s. name, u)
153153
154154function Base. isequal (a:: Sym , b:: Sym )
155155 symtype (a) != = symtype (b) && return false
@@ -331,11 +331,13 @@ end
331331# # This is much faster than hash of an array of Any
332332hashvec (xs, z) = foldr (hash, xs, init= z)
333333
334- function Base. hash (t:: Term{T} , salt:: UInt ) where {T}
334+ function Base. hash (t:: Term , salt:: UInt )
335335 ! iszero (salt) && return hash (hash (t, zero (UInt)), salt)
336336 h = t. hash[]
337337 ! iszero (h) && return h
338- h′ = hashvec (arguments (t), hash (operation (t), hash (T, salt)))
338+ op = operation (t)
339+ oph = op isa Function ? nameof (op) : op
340+ h′ = hashvec (arguments (t), hash (oph, salt))
339341 t. hash[] = h′
340342 return h′
341343end
You can’t perform that action at this time.
0 commit comments