File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -394,7 +394,9 @@ We check against the map before making a new copy; otherwise
394394we can simply reference the existing copy.
395395[Thanks to Ted Hopp.](https://stackoverflow.com/questions/49285475/how-to-copy-a-full-non-binary-tree-including-loops)
396396"""
397- function copy_node (tree:: N ; break_sharing= Val (false )) where {T,N<: AbstractExpressionNode{T} }
397+ function copy_node (
398+ tree:: N ; break_sharing:: Val = Val (false )
399+ ) where {T,N<: AbstractExpressionNode{T} }
398400 return tree_mapreduce (
399401 t -> if t. constant
400402 constructorof (N)(; val= t. val:: T )
@@ -409,7 +411,9 @@ function copy_node(tree::N; break_sharing=Val(false)) where {T,N<:AbstractExpres
409411 )
410412end
411413
412- copy (tree:: AbstractExpressionNode ) = copy_node (tree)
414+ function copy (tree:: AbstractExpressionNode ; break_sharing:: Val = Val (false ))
415+ return copy_node (tree; break_sharing)
416+ end
413417
414418"""
415419 convert(::Type{AbstractExpressionNode{T1}}, n::AbstractExpressionNode{T2}) where {T1,T2}
You can’t perform that action at this time.
0 commit comments