Thanks to visit codestin.com
Credit goes to github.com

Skip to content

meta.trait.hasUniqueRepresentation handles vector types incorrectly #9333

@tau-dev

Description

@tau-dev
comptime { std.debug.assert(@sizeOf(@Vector(3, i16)) == 6); }

fails with Zig 0.8.0. I don't know if this is intended behavior, but it seems to me that the padding should not be counted towards the size. mem.asBytes, for example, results in a slice containing undefined data, and an AutoHashMap with @Vector(3, i16) keys is silently broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions