K2: fix enhancement building for Java methods with type parameters
Before this commit, we copied each type parameter during method enhancement, while not copying the symbol. This led to symbol clashes in MPP scenarios and various other problems. Now we create a fully-functional type parameter copy in enhancement and perform a substitution of old type parameters with new ones in receiver type, value parameter types, return type, and type parameter upper bounds. #KT-59766 Fixed #KT-59738 Fixed
This commit is contained in:
committed by
Space Team
parent
52068e11ee
commit
c350280e64
+5
@@ -28487,6 +28487,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/anonymousObjectAndSpecificImplementationInDeserializedIr.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaMethodWithTypeParameter.kt")
|
||||
public void testJavaMethodWithTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/javaMethodWithTypeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user