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:
@@ -3,6 +3,13 @@
|
||||
<!-- Find: ([^\`/\[])(KT-\d+) -->
|
||||
<!-- Replace: $1[`$2`](https://youtrack.jetbrains.com/issue/$2) -->
|
||||
|
||||
## 1.1-M03 (EAP-3)
|
||||
|
||||
### Compiler
|
||||
|
||||
#### Coroutines related issues
|
||||
- Make fields for storing lambda parameters non-final (as they get assigned within `invoke` call)
|
||||
|
||||
## 1.1-M02 (EAP-2)
|
||||
|
||||
### Language features
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ final class CoroutineFieldsKt$box$1 {
|
||||
private field J$0: long
|
||||
private field L$0: java.lang.Object
|
||||
private field L$1: java.lang.Object
|
||||
private final field p$0: java.lang.String
|
||||
private final field p$1: long
|
||||
private field p$0: java.lang.String
|
||||
private field p$1: long
|
||||
inner class CoroutineFieldsKt$box$1
|
||||
method <init>(p0: kotlin.jvm.internal.Ref$ObjectRef): void
|
||||
protected final method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): void
|
||||
|
||||
Reference in New Issue
Block a user