[Java] Generate Longs from uint enums (#8727)

Co-authored-by: Neville Dipale <neville@urbanlogiq.com>
Co-authored-by: Max Burke <max@urbanlogiq.com>
This commit is contained in:
Wakahisa
2025-11-26 17:58:25 +02:00
committed by GitHub
parent 2951d5383a
commit afd07bdec5

View File

@@ -445,7 +445,8 @@ class JavaGenerator : public BaseGenerator {
code += " ";
code += namer_.Variant(ev) + " = ";
code += enum_def.ToString(ev);
if (enum_def.underlying_type.base_type == BASE_TYPE_LONG ||
if (enum_def.underlying_type.base_type == BASE_TYPE_UINT ||
enum_def.underlying_type.base_type == BASE_TYPE_LONG ||
enum_def.underlying_type.base_type == BASE_TYPE_ULONG) {
code += "L";
}