Skip to content

Basetype of Int32 does not allow 64-bit values #27

@hojalot

Description

@hojalot

Defining an enum, for example that could be used as a bitmask for a 64-bit value, such as:

@cenum(FormatBits,
A_SMALL_BITMASK_VALUE = 20,
A_LARGE_BITMASK_VALUE = 5123123123,
)

, results in InexactError: trunc(Int32, ... This seems to be a result of the basetype =Int32 line in the cenum macro. Similar behavior can be seen with v::Int32 = 5123123123.

Changing the line to basetype = Int (without the "32") allows these larger values.

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