Skip to content

Possible to create BitX with invalid value (out of range) #8

Description

@fanoI

This works correctly:

Bit3 b3 = 99;

I got the expected error: "Constant value '99' cannot be converted to a 'Bit3'"

but this passes:

Bit3 b3 = 98 + 1;

Admittedly is strange to use the '+' on a Bit... I don't if is possible to catch this error too or not...

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