JVM: rename this$0 when regenerating nested objects too
In the old backend, this was unnecessary because nested objects would reference their lambdas' captures through the original this$0. On JVM_IR, using loose capture fields means a name/descriptor clash can occur on any level of nesting, not just the top.
This commit is contained in:
+10
@@ -506,6 +506,16 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt");
|
||||
|
||||
Generated
+10
@@ -506,6 +506,16 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt");
|
||||
|
||||
Generated
+10
@@ -506,6 +506,16 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt");
|
||||
|
||||
Reference in New Issue
Block a user