File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,12 @@ function any(f::F, tree::Node) where {F<:Function}
121121 end
122122end
123123
124- function Base.:(== )(a:: Node{T } , b:: Node{T } ):: Bool where {T }
124+ function Base.:(== )(a:: Node{T1 } , b:: Node{T2 } ):: Bool where {T1,T2 }
125125 (degree = a. degree) != b. degree && return false
126126 if degree == 0
127127 (constant = a. constant) != b. constant && return false
128128 if constant
129- return a. val:: T == b. val:: T
129+ return a. val:: T1 == b. val:: T2
130130 else
131131 return a. feature == b. feature
132132 end
@@ -136,11 +136,6 @@ function Base.:(==)(a::Node{T}, b::Node{T})::Bool where {T}
136136 return a. op == b. op && a. l == b. l && a. r == b. r
137137 end
138138end
139- function Base.:(== )(a:: Node{T1} , b:: Node{T2} ):: Bool where {T1,T2}
140- # TODO : Should also have preserve_sharing check... But how?
141- T = promote_type (T1, T2)
142- return Node {T} (a) == Node {T} (b)
143- end
144139
145140# ##############################################################################
146141# Derived functions: ##########################################################
You can’t perform that action at this time.
0 commit comments