mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 04:35:07 +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:
@@ -8,7 +8,8 @@ class OptionalByte private constructor() {
|
||||
companion object {
|
||||
const val None: Byte = 0
|
||||
const val One: Byte = 1
|
||||
val names : Array<String> = arrayOf("None", "One")
|
||||
const val Two: Byte = 2
|
||||
val names : Array<String> = arrayOf("None", "One", "Two")
|
||||
fun name(e: Int) : String = names[e]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user