In kotlin 2.1.0 and above synchronisation for int ...
# k2-adopters
p
In kotlin 2.1.0 and above synchronisation for int is prohibited. While ANDROID STUDIO(version: Meerkat 2023.3.1 Nightly) is not showing any error, though getting error during compilation. And there's no issue in kotlin 2.0.0. Wanted to understand if this is a bug or intended change in kotlin 2.1.0?
k
It was inteded, see https://youtrack.jetbrains.com/issue/KT-67791. Synchronizing on boxed primitives is very error prone.
The warning was present in K1 but was missing in 2.0.0. It was readded in 2.0.20.
p
Thanks for the clarification