You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0
at org.objectweb.asm.Frame.a(Unknown Source)
at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)
at kotlinx.atomicfu.transformer.AtomicFUTransformer$TransformerMV.visitEnd(AtomicFUTransformer.kt:611)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at kotlinx.atomicfu.transformer.AtomicFUTransformer.transformFile(AtomicFUTransformer.kt:237)
at kotlinx.atomicfu.transformer.AtomicFUTransformer.transform(AtomicFUTransformer.kt:172)
at kotlinx.atomicfu.plugin.gradle.AtomicFUTransformTask.transform(AtomicFUGradlePlugin.kt:387)
This works fine
classBot( ... ) {
privateval count = atomic<Int>(0)
val id = count.getAndUpdate { it +1 }
}
But this doesn't work
classBot( ... ){
val id = count.getAndUpdate { it +1 }
companionobject {
privateval count = atomic<Int>(0)
}
}
And after I removed private, I got a new exception Unsupported return within atomic operation
The text was updated successfully, but these errors were encountered:
This works fine
But this doesn't work
And after I removed
private
, I got a new exceptionUnsupported return within atomic operation
The text was updated successfully, but these errors were encountered: