Skip to content

Commit

Permalink
Use Base.promote_op() instead of Base._return_type()
Browse files Browse the repository at this point in the history
return_type() is kinda broken in v1.10, see:
JuliaLang/julia#52385

In any case Base.promote_op() is the official public API for this operation so
we should use it anyway.
  • Loading branch information
JamesWrigley authored and jpsamaroo committed May 2, 2024
1 parent 3a33269 commit eab77fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/submission.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ end
function EagerThunkMetadata(spec::EagerTaskSpec)
f = chunktype(spec.f).instance
arg_types = ntuple(i->chunktype(spec.args[i][2]), length(spec.args))
return_type = Base._return_type(f, Base.to_tuple_type(arg_types))
return_type = Base.promote_op(f, arg_types...)
return EagerThunkMetadata(return_type)
end
chunktype(t::EagerThunk) = t.metadata.return_type
Expand Down

0 comments on commit eab77fe

Please sign in to comment.