Open vdshb opened 8 months ago
Hi! Thank you for the report. Unfortunatelly, atomicfu compiler plugin does not support initialization of atomics via calls to inline functions like update
in the init {}
block yet. update
function should only be called from another function.
And in init {}
block you can set the value of an atomic:
private val foo = atomic(1)
init {
foo.value = 2
}
Or
private val foo: AtomicInt
init {
foo = atomic(1)
}
kotlin 1.9.10, atomicfu-gradle-plugin 0.22.0 with default config
Code example:
Compile time exception: