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:
Denis Zharkov
2016-11-03 17:34:49 +03:00
parent e54b466010
commit bd5c08f598
3 changed files with 10 additions and 3 deletions
@@ -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)
}