Skip to content

Commit

Permalink
Avoid calling promote_tuple_eltype in generated function to fix issue
Browse files Browse the repository at this point in the history
with promotion of user defined types.
  • Loading branch information
andreasnoack authored and c42f committed Oct 16, 2019
1 parent 79d378b commit 1a9b4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SArray.jl
Expand Up @@ -46,7 +46,7 @@ end
@generated function (::Type{SArray{S}})(x::T) where {S <: Tuple, T <: Tuple}
return quote
@_inline_meta
SArray{S, $(promote_tuple_eltype(T)), $(tuple_length(S)), $(tuple_prod(S))}(x)
SArray{S, promote_tuple_eltype(T), $(tuple_length(S)), $(tuple_prod(S))}(x)
end
end

Expand Down

0 comments on commit 1a9b4e6

Please sign in to comment.