Only generate @kotlin.ExperimentalUnsigned annotation on create*Vector methods having an unsigned array type parameter. (#7881)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Aaron Riekenberg
2023-04-28 12:10:01 -05:00
committed by GitHub
parent c192ab423b
commit 417821fdd7
32 changed files with 12 additions and 33 deletions

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class Attacker : Table() {
fun __init(_i: Int, _bb: ByteBuffer) {

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class BookReader : Struct() {
fun __init(_i: Int, _bb: ByteBuffer) {

View File

@@ -1,7 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class Character_ private constructor() {
companion object {
const val NONE: UByte = 0u

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class FallingTub : Struct() {
fun __init(_i: Int, _bb: ByteBuffer) {

View File

@@ -1,7 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class Gadget private constructor() {
companion object {
const val NONE: UByte = 0u

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class HandFan : Table() {
fun __init(_i: Int, _bb: ByteBuffer) {

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class Movie : Table() {
fun __init(_i: Int, _bb: ByteBuffer) {
@@ -99,6 +98,7 @@ class Movie : Table() {
fun addMainCharacterType(builder: FlatBufferBuilder, mainCharacterType: UByte) = builder.addByte(0, mainCharacterType.toByte(), 0)
fun addMainCharacter(builder: FlatBufferBuilder, mainCharacter: Int) = builder.addOffset(1, mainCharacter, 0)
fun addCharactersType(builder: FlatBufferBuilder, charactersType: Int) = builder.addOffset(2, charactersType, 0)
@kotlin.ExperimentalUnsignedTypes
fun createCharactersTypeVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
builder.startVector(1, data.size, 1)
for (i in data.size - 1 downTo 0) {

View File

@@ -17,7 +17,6 @@ import java.nio.ByteOrder
import kotlin.math.sign
@Suppress("unused")
@kotlin.ExperimentalUnsignedTypes
class Rapunzel : Struct() {
fun __init(_i: Int, _bb: ByteBuffer) {