[Kotlin] Support for optional scalars. (#6115)

More information on #6014
This commit is contained in:
Paulo Pinheiro
2020-09-18 08:31:51 +02:00
committed by GitHub
parent e1be8aaadd
commit 6228b66d3d
7 changed files with 463 additions and 31 deletions

View File

@@ -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.