Skip to content

Bug: SVector(SVector(x))===SVector(x) #1340

@PhilippeMaincon

Description

@PhilippeMaincon

Constructing a length=1 SVector, with element a length=1 SVector results in one container being peeled away.

SVector(SVector(x))===SVector(x) forall x...

eltype(SVector(SVector(:a))) returns Symbol

SVector{1,SVector{1,Int64}}(SVector(1))
ERROR: MethodError: Cannot `convert` an object of type Int64 to an object of type SVector{1, Int64}

That's with StaticArrays v1.9.16, but also StaticArrays v1.9.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions