[Kotlin] Fix union vector accessor after change in Java API (#5605)

Kolin uses java library as dependency, which changed the way it access union vector recently
(e365c502ff).

This changes updates kotlin code generation to match Java's changes.
This commit is contained in:
Paulo Pinheiro
2019-11-04 23:25:07 +01:00
committed by Wouter van Oortmerssen
parent 3c7b660d62
commit 8526e12d73
3 changed files with 5 additions and 8 deletions

View File

@@ -975,9 +975,6 @@ class KotlinGenerator : public BaseGenerator {
params = "obj: " + field_type + ", j: Int";
}
writer.SetValue("toType", "YYYYY");
auto ret_type = return_type + nullable;
GenerateFun(writer, field_name, params, ret_type, [&](){
auto inline_size = NumToString(InlineSize(vectortype));
@@ -1008,7 +1005,7 @@ class KotlinGenerator : public BaseGenerator {
GenerateFun(writer, field_name, "obj: " + field_type,
return_type + "?", [&](){
writer += OffsetWrapperOneLine(offset_val,
bbgetter + "(obj, o)",
bbgetter + "(obj, o + bb_pos)",
"null");
});
break;