Skip to content

Commit

Permalink
force specialization of single-expression nif
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jul 11, 2024
1 parent 88e783d commit 6cb039b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/cartesian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ julia> Base.Cartesian.nif(d -> x[d] > 0, d -> d, Val(4))
3
```
"""
@inline function nif(condition, expression, ::Val{N}) where {N}
@inline function nif(condition::F, expression::G, ::Val{N}) where {F,G,N}
nif(condition, expression, expression, Val(N))
end
@inline function nif(condition::F, expression::G, else_expression::H, ::Val{N}) where {F,G,H,N}
Expand Down

0 comments on commit 6cb039b

Please sign in to comment.