Vsevolod Tolstopyatov
Vsevolod Tolstopyatov
Some context: We at kotlinx.coroutines have a special "debug" library that uses ByteByddy to redefine some classes for the sake of better user experience. Our API shape has two modes:...
With best-effort zero-copy
To give users precise control over count of bytes to read
As one of the most useful shorthands for `readByteArray(arr)`
JVM currently replaces all malformed input during decoding while Native silently ignores it. `underflow`, `overflow`, `malformed` and `unmappable` flags should be consistent with JVM by default especially in the face...
Steps to reproduce: ``` // File in kotlinx.coroutines project val a = atomic(0) class MyTest { @Test fun foo() = runTest { a.incrementAndGet() } } ``` Actual behaviour: `File.kt:51: kotlinx.coroutines.MyTest$foo$1::invokeSuspend:...
Steps-to-reproduce: ``` class Foo { private val foo = atomic(0L).also { println(it) } } ``` Priority: low
It is mostly a compiler omission ([KT-26436](https://youtrack.jetbrains.com/issue/KT-26436), [KT-25112](https://youtrack.jetbrains.com/issue/KT-25112)), but creates a false sense that such constructors are part of public ABI
This issue is for discussion of [the proposal](https://github.com/Kotlin/KEEP/blob/master/proposals/subclass-opt-in-required.md) to introduce `@SubclassOptInRequired` annotation in Kotlin to provide a mechanism to require opt-in for API implementation only. Proposal PR https://github.com/Kotlin/KEEP/pull/319