Skip to content

Make printing AbstractBitVector1 more generic #3

Description

@jlapeyre

This line

l = v isa BitVector1 ? lastactualpos(v.x) : v.len

Only supports current subtypes. I made a subtype that stores length in a different way. Using this line:

l = v isa BitVector1 ? lastactualpos(v.x) : length(v)

would make it more generic. Better yet would be something like:

printlength(v::Bits.BitVector1) = Bits.lastactualpos(v.x)
printlength(v) = length(v)

And then

l = printlength(v)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions