Skip to content

And constructor too restrictive on immediates #57

Description

@dvanhorn

The And constructor (and Or, etc) requires an immediate to be at most 32-bits, but it checks this property incorrectly, basically checking the integer as a 32-bit signed integer (thus 31-bits + sign). This means, e.g. #xFFFFFFFF is rejected even though (32-bit-integer? #xFFFFFFFF) produces #t. A better check would be that the argument is either a 32-bit non-negative integer or a negative 31-bit integer, which is exactly what 32-bit-integer? recognizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions