Skip to content

Commit 7fa16e5

Browse files
committed
refactor: fix type instability within get_constants
1 parent 8fd110b commit 7fa16e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NodeUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ given the output of this function.
7777
Also return metadata that can will be used in the `set_constants!` function.
7878
"""
7979
function get_constants(tree::AbstractExpressionNode{T}) where {T}
80-
refs = filter_map(is_node_constant, node -> Ref(node), tree, Ref{typeof(tree)})
80+
refs = filter_map(is_node_constant, Ref, tree, Base.RefValue{typeof(tree)})
8181
return map(ref -> ref[].val::T, refs), refs
8282
# NOTE: Do not remove this `::T` as it is required for inference on empty collections
8383
end

0 commit comments

Comments
 (0)