Make fields for storing lambda parameters non-final
Because they get assigned within `invoke` call that contradicts with JVM spec where it's told that they must not be assigned outside of constructors
This commit is contained in:
@@ -59,7 +59,7 @@ class CoroutineCodegen(
|
||||
for (parameter in funDescriptor.valueParameters) {
|
||||
v.newField(
|
||||
OtherOrigin(parameter),
|
||||
Opcodes.ACC_PRIVATE or Opcodes.ACC_FINAL,
|
||||
Opcodes.ACC_PRIVATE,
|
||||
COROUTINE_LAMBDA_PARAMETER_PREFIX + parameter.index,
|
||||
typeMapper.mapType(parameter.type).descriptor, null, null)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user