You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At an earlier point, it did infer things like stack(empty!([(1,2,3)])) to be 3×0 Matrix. The same could have worked for this Vector{SVector} example (not sure if it did). But these paths gave type-instabilities... where normally stack(xs) calls similar(xs[1], ...), the empty case can't do that & wanted methods of similar(eltype(xs), ...) which don't exist.
In the stacktrace from the above error, the last function is _empty_stack which used to implement this, and now just always throws. It might be possible for StaticArrays to overload this, to catch only types it owns & hence not produce instabilities on Base / StructArrays.
This could work and it would be convenient for handling the empty case. Thoughts?
The text was updated successfully, but these errors were encountered: