mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 05:52:26 +00:00
[Kotlin] Fix Access to union of vector element (#5994)
Kotlin code generation was producing wrong logic for accessors of vector of union elements. This was shadowed by the fact[1] that asserts in Kotlin are silently ignored unless the flag "-ea" is passed to the JVM. The tests are also updated to enable asserts. 1 - https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/assert.html
This commit is contained in:
@@ -40,7 +40,7 @@ kotlinc $all_kt_files -classpath $targetdir -include-runtime -d $targetdir
|
||||
# Make jar
|
||||
jar cvf ${testdir}/kotlin_test.jar -C $targetdir . > /dev/null
|
||||
# Run test
|
||||
kotlin -cp ${testdir}/kotlin_test.jar KotlinTest
|
||||
kotlin -J"-ea" -cp ${testdir}/kotlin_test.jar KotlinTest
|
||||
# clean up
|
||||
rm -rf $targetdir
|
||||
rm ${testdir}/kotlin_test.jar
|
||||
|
||||
Reference in New Issue
Block a user