Skip to content

Commit a480d78

Browse files
authored
Merge pull request #46 from SymbolicML/type-stability
Type stability in hashing
2 parents 28dcd2d + 86bf750 commit a480d78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ in(item, tree::Node) = any(t -> t == item, tree)
228228
length(tree::Node) = sum(Returns(1), tree)
229229
function hash(tree::Node{T}) where {T}
230230
return tree_mapreduce(
231-
t -> hash(t.constant ? (0, t.val::T) : (1, t.feature)),
231+
t -> t.constant ? hash((0, t.val::T)) : hash((1, t.feature)),
232232
t -> hash((t.degree + 1, t.op)),
233233
(n...) -> hash(n),
234234
tree,

0 commit comments

Comments
 (0)