Skip to content

Adding n x 0 matrices results in Union{} eltype #528

@tkoolen

Description

@tkoolen

On 0.9.1:

julia> using StaticArrays

julia> x = zeros(SMatrix{3, 0, Float64})
3×0 SArray{Tuple{3,0},Float64,2,0}

julia> x + x
3×0 SArray{Tuple{3,0},Union{},2,0}

while on 0.8.3:

julia> using StaticArrays

julia> x = zeros(SMatrix{3, 0, Float64})
3×0 SArray{Tuple{3,0},Float64,2,0}

julia> x + x
3×0 SArray{Tuple{3,0},Float64,2,0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    designspeculative design related issueinference

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions