JVM: regenerate objects if they have been regenerated in parent contexts
This is a hack to work around the fact that type mappings should not be inherited by inlining contexts for lambdas called from anonymous objects. As the lambda can call the inline function again, this could produce a reference to the original object, which is remapped to a new type in the parent context. Unfortunately, there are many redundant `MethodRemapper`s between the lambda and the class file, so simply editing `TypeRemapper` does not work. Hence, this hack. For now. (Issue found by compiling IntelliJ IDEA BTW.)
This commit is contained in:
+5
@@ -102,6 +102,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructOriginalInRegenerated.kt")
|
||||
public void testConstructOriginalInRegenerated() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructorVisibility.kt")
|
||||
public void testConstructorVisibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt");
|
||||
|
||||
Reference in New Issue
Block a user