summaryrefslogtreecommitdiff
path: root/tests/MyGame
diff options
context:
space:
mode:
authorPaulo Pinheiro <paulovictor.pinheiro@gmail.com>2019-11-04 23:25:07 +0100
committerWouter van Oortmerssen <aardappel@gmail.com>2019-11-04 14:25:07 -0800
commit8526e12d73d4b793024c60dd348f8b92a24c6ce2 (patch)
treefc5acea63a086ed5dc477af30efa4353c7ad9263 /tests/MyGame
parent3c7b660d623b160c24fe72290011cb23be858fc2 (diff)
downloadflatbuffers-8526e12d73d4b793024c60dd348f8b92a24c6ce2.tar.gz
flatbuffers-8526e12d73d4b793024c60dd348f8b92a24c6ce2.tar.bz2
flatbuffers-8526e12d73d4b793024c60dd348f8b92a24c6ce2.zip
[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 (e365c502ffc659752f9b7a8d60b0052a07e33659). This changes updates kotlin code generation to match Java's changes.
Diffstat (limited to 'tests/MyGame')
-rw-r--r--tests/MyGame/Example/Monster.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/MyGame/Example/Monster.kt b/tests/MyGame/Example/Monster.kt
index ff0d3a86..bbeeb26a 100644
--- a/tests/MyGame/Example/Monster.kt
+++ b/tests/MyGame/Example/Monster.kt
@@ -116,7 +116,7 @@ class Monster : Table() {
}
}
fun test(obj: Table) : Table? {
- val o = __offset(20); return if (o != 0) __union(obj, o) else null
+ val o = __offset(20); return if (o != 0) __union(obj, o + bb_pos) else null
}
fun test4(j: Int) : MyGame.Example.Test? = test4(MyGame.Example.Test(), j)
fun test4(obj: MyGame.Example.Test, j: Int) : MyGame.Example.Test? {
@@ -717,7 +717,7 @@ class Monster : Table() {
}
}
fun anyUnique(obj: Table) : Table? {
- val o = __offset(92); return if (o != 0) __union(obj, o) else null
+ val o = __offset(92); return if (o != 0) __union(obj, o + bb_pos) else null
}
val anyAmbiguousType : UByte
get() {
@@ -734,7 +734,7 @@ class Monster : Table() {
}
}
fun anyAmbiguous(obj: Table) : Table? {
- val o = __offset(96); return if (o != 0) __union(obj, o) else null
+ val o = __offset(96); return if (o != 0) __union(obj, o + bb_pos) else null
}
fun vectorOfEnums(j: Int) : UByte {
val o = __offset(98)