Closed qwwdfsad closed 5 years ago
I think it is time to introduce a validation step to the postprocessor to avoid issues like that in the future
Hm... I thought I did fix it in https://github.com/Kotlin/kotlinx.atomicfu/commit/ec234e4d92148c44aace086a4d6dced81e1b33ba I'll investigate what's going on there.
Fixed in version 0.12.7
Consider the following user-defined extension:
private inline fun AtomicBoolean.tryAcquire(): Boolean = compareAndSet(false, true)
Currently, the postprocessor retains the original method in the bytecode. While it is okay for the Kotlin compiler to do so, it is not the case for
atomicfu
that should remove every trace of itself after post-processing. Otherwise, resulting classfiles are polluted with symbols that are missing from the classpath (and it may trigger warnings like https://github.com/Kotlin/kotlinx.coroutines/issues/1155).Also, note that not only extensions but their access-bridges should be removed.