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:
+12
@@ -647,6 +647,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
+12
@@ -647,6 +647,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
+12
@@ -647,6 +647,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
+12
@@ -647,6 +647,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
+12
@@ -647,6 +647,18 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
+12
@@ -647,6 +647,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested.kt")
|
||||
public void testKt8668_nested() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt8668_nested_2.kt")
|
||||
public void testKt8668_nested_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoDifferentDispatchReceivers.kt")
|
||||
public void testTwoDifferentDispatchReceivers() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user