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
The problem is that the constructors for both types of static arrays flatten the tuple argument. I understand why, given that the data is stored as a tuple inside those data structures. Still I think given the goal for this package this should be considered a bug.
Btw, for StaticArrays the macro seems not to share this issue:
Yes, I knew about this. The "real" constructor accepts a tuple of elements, so a single-element SVector of Tuple{Int,String} would be called by SVector(((1,"a"),)).
I provide (as does Simon) a convenience constructor along the lines of SVector(x...) = SVector(x). This makes a single-element array of Tuple{Int,String} ambiguous with a multi-element array of promote_type(Int, String).
I need to revisit all the constructors once Jeff's improved subtyping algorithm lands, since I am working with the quirks of the current system which are changing. Previously, getting anything working was very, very difficult. Perhaps a bit more logic can be applied in the new system (e.g. if promote_type isn't concrete then perhaps the user wanted an array of tuples...).
I hit the following inconsistent border case in using StaticArrays/FixedSizeArrays:
The problem is that the constructors for both types of static arrays flatten the tuple argument. I understand why, given that the data is stored as a tuple inside those data structures. Still I think given the goal for this package this should be considered a bug.
Btw, for StaticArrays the macro seems not to share this issue:
My apologies if posting this issue to both projects is annoying.
The text was updated successfully, but these errors were encountered: