Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynamicExpressions"
uuid = "a40a106e-89c9-4ca8-8020-a735e8728b6b"
authors = ["MilesCranmer <[email protected]>"]
version = "2.0.0"
version = "2.0.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
7 changes: 3 additions & 4 deletions src/Evaluate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,8 @@

# TODO: Hack to fix type instability in some branches that can't be inferred.
# It does this using the other branches, which _can_ be inferred.
@unstable function _get_return_type(tree, cX, operators, eval_options)
# public Julia API version of `Core.Compiler.return_type(_eval_tree_array, typeof((tree, cX, operators, eval_options)))`
return eltype([_eval_tree_array(tree, cX, operators, eval_options) for _ in 1:0])
@unstable function _get_return_type(tree, cX, eval_options)
return Core.Compiler.return_type(deg0_eval, typeof((tree, cX, eval_options)))

Check warning on line 350 in src/Evaluate.jl

View check run for this annotation

Codecov / codecov/patch

src/Evaluate.jl#L349-L350

Added lines #L349 - L350 were not covered by tests
end

# This basically forms an if statement over the operators for the degree.
Expand All @@ -361,7 +360,7 @@
) where {T,degree}
return _inner_dispatch_degn_eval(
tree, cX, Val(degree), operators, eval_options
)::(_get_return_type(tree, cX, operators, eval_options))
)::(_get_return_type(tree, cX, eval_options))
end
@generated function _inner_dispatch_degn_eval(
tree::AbstractExpressionNode{T},
Expand Down
Loading