Skip to content

Commit

Permalink
Fix stackoverflow for fallback of scalartype (attempt II)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos authored Apr 19, 2024
1 parent c8991c7 commit eea0695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fallbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function scalartype(T::Type)
# the following does not work because `eltype` is always applicable.
# applicable(eltype, T) && return scalartype(eltype(T))
elT = eltype(T)
elT === Any && throw(ArgumentError(_error_message(scalartype, T)))
elT === T && throw(ArgumentError(_error_message(scalartype, T)))
return scalartype(elT)
end
# should this try to use `eltype` instead? e.g. scalartype(T) = scalartype(eltype(T))
Expand Down

0 comments on commit eea0695

Please sign in to comment.