Skip to content

Conversation

@paulovap
Copy link
Contributor

More information on #6014

@paulovap paulovap force-pushed the kotlin_scalar_optional branch 2 times, most recently from 491582f to ed71f40 Compare September 13, 2020 20:10
@paulovap paulovap force-pushed the kotlin_scalar_optional branch from ed71f40 to d1ee5e1 Compare September 14, 2020 19:20
@aardappel
Copy link
Collaborator

LGTM!

@aardappel
Copy link
Collaborator

@CasperN ?

auto base_type = field.value.type.base_type;

auto r_type = GenTypeGet(field.value.type);
if (field.IsScalarOptional() ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you not need to check for required fields?

I'm hoping field.optional is enough to determine whether the output field is optional or not - (though we're already inconsistent around vectors as nonpresense is null in C++/Rust but empty-vector in swift)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you not need to check for required fields?

Scalar fields can't have required attribute.
@aardappel Merge it?

@aardappel aardappel merged commit 6228b66 into google:master Sep 18, 2020
ivannp pushed a commit to ivannp/flatbuffers that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants