Do not rely on descriptors in KParameterImpl.equals/hashCode
For the same reason as in the previous commit: descriptors are cached via weak references in moduleByClassLoader.kt and can be garbage-collected at any point. So different instances of KParameterImpl representing the same parameter may store different instances of descriptors.
This commit is contained in:
+5
@@ -25387,6 +25387,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("parametersEqualsWithClearCaches.kt")
|
||||
public void testParametersEqualsWithClearCaches() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsWithClearCaches.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("parametersToString.kt")
|
||||
public void testParametersToString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt");
|
||||
|
||||
Reference in New Issue
Block a user