mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 00:25:26 +00:00
[Kotlin] Support for optional scalars. (#6115)
More information on #6014
This commit is contained in:
@@ -305,6 +305,10 @@ struct FieldDef : public Definition {
|
||||
|
||||
bool Deserialize(Parser &parser, const reflection::Field *field);
|
||||
|
||||
bool IsScalarOptional() const {
|
||||
return IsScalar(value.type.base_type) && optional;
|
||||
}
|
||||
|
||||
Value value;
|
||||
bool deprecated; // Field is allowed to be present in old data, but can't be.
|
||||
// written in new data nor accessed in new code.
|
||||
|
||||
Reference in New Issue
Block a user