Skip to content

Support ulong in Java #8610

@Martmists-GH

Description

@Martmists-GH

I'm working with some game data with weird values, so I made the following enum:

enum Condition : ulong {
    Empty = 0,
    GreaterThanEqual = 0x34F605C97C571896,
    LessThanEqual = 0x488B1F9FBC949365,
    NotEqual = 0x88C99E99F1FC6C55,
    Equal = 0xB763CBE88B6F844F,
    None = 0xCBF29CE484222645,
    Between = 0xE5E34D77DC75E2EF
}

However, trying to compile this in Java:

/path/to/project/generated/TiggerConditionType.java:43: error: integer number too large
  public static final long None = 14695981039346656837L;
                                  ^

The issue seems to stem from the fact that long is a signed type in Java, but the generator places it as if it were a ulong, not realizing it should be converting it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    javapr-requestedA Pull Request is requested to move the issue forward.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions