Skip to content

Commit

Permalink
Don't pass promote_reals recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Mar 20, 2023
1 parent 8e5f9cd commit 0dd667d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stan_math_backend/Lower_expr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ and lower_expr ?(promote_reals = false)
if promote_reals then
(* this can be important for e.g. templated function calls
where we might generate an incorrect specification for int *)
static_cast Cpp.Double ((lower_expr ~promote_reals:true) expr)
static_cast Cpp.Double (lower_expr expr)
else lower_expr expr
| Promotion (expr, UComplex, DataOnly) when is_scalar expr ->
(* this is in principle a little better than promote_scalar since it is constexpr *)
Expand Down

0 comments on commit 0dd667d

Please sign in to comment.