mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 02:03:06 +00:00
Kotlin test optional enum (#6201)
* Add test for optional enums in Kotlin * Rename optional_scalars2.fbs into optional_scalars.fbs Also updated all references in the project to point to "optional_scalars.fbs" instead of "optional_scalars2.fbs".
This commit is contained in:
@@ -3,6 +3,7 @@ namespace optional_scalars;
|
||||
enum OptionalByte: byte {
|
||||
None = 0,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
}
|
||||
|
||||
// This table tests optional scalars in tables. It should be integrated with
|
||||
@@ -48,8 +49,7 @@ table ScalarStuff {
|
||||
default_bool: bool = true;
|
||||
|
||||
just_enum: OptionalByte;
|
||||
// Rust code generator failed with optional<enum>
|
||||
//maybe_enum: OptionalByte = null;
|
||||
maybe_enum: OptionalByte = null;
|
||||
default_enum: OptionalByte = One;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user