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:
Paulo Pinheiro
2020-10-22 22:36:02 +02:00
committed by GitHub
parent fe8e3c7e5d
commit 1606fb6375
18 changed files with 86 additions and 106 deletions

View File

@@ -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;
}