[K/N] Do not cast the result of atomicGet/atomicSet invocation from Boolean to Byte in VolatileFieldsLowering, because this cast is done by the property getter.
Merge-request: KT-MR-11347 Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
This commit is contained in:
+3
@@ -246,6 +246,9 @@ internal class VolatileFieldsLowering(val context: Context) : FileLoweringPass {
|
||||
putValueArgument(index, expression.getValueArgument(index))
|
||||
}
|
||||
}.let {
|
||||
if (intrinsicType == IntrinsicType.ATOMIC_GET_FIELD || intrinsicType == IntrinsicType.ATOMIC_SET_FIELD) {
|
||||
return it
|
||||
}
|
||||
if (backingField.requiresBooleanConversion()) {
|
||||
for (arg in 0 until it.valueArgumentsCount) {
|
||||
it.putValueArgument(arg, builder.irBoolToByte(it.getValueArgument(arg)!!))
|
||||
|
||||
Reference in New Issue
Block a user