Skip to content

Commit 4be9924

Browse files
committed
Incorporate symtype in hash for Sym
1 parent 62403b9 commit 4be9924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ const ADD_SALT = 0xaddaddaddaddadda % UInt
279279
const SUB_SALT = 0xaaaaaaaaaaaaaaaa % UInt
280280
const DIV_SALT = 0x334b218e73bbba53 % UInt
281281
const POW_SALT = 0x2b55b97a6efb080c % UInt
282-
function Base.hash(s::BasicSymbolic, salt::UInt)::UInt
282+
function Base.hash(s::BasicSymbolic{T}, salt::UInt)::UInt where {T}
283283
E = exprtype(s)
284284
if E === SYM
285-
hash(nameof(s), salt SYM_SALT)
285+
hash(T, hash(nameof(s), salt SYM_SALT))
286286
elseif E === ADD || E === MUL
287287
!iszero(salt) && return hash(hash(s, zero(UInt)), salt)
288288
h = s.hash[]

0 commit comments

Comments
 (0)