Skip to content

Commit 1fb2024

Browse files
committed
Avoid using Core.Inference.return_type when possible
1 parent 8a265e8 commit 1fb2024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mapreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ end
235235
@generated function _diff(::Size{S}, a::StaticArray, ::Type{Val{D}}) where {S,D}
236236
N = length(S)
237237
Snew = ([n==D ? S[n]-1 : S[n] for n = 1:N]...)
238-
T = Core.Inference.return_type(-, Tuple{eltype(a),eltype(a)})
238+
T = typeof(one(eltype(a)) - one(eltype(a)))
239239

240240
exprs = Array{Expr}(Snew)
241241
itr = [1:n for n = Snew]

0 commit comments

Comments
 (0)