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:
Alexander Udalov
2020-05-27 16:50:31 +02:00
parent 55f384cb04
commit 1f1790d60e
6 changed files with 68 additions and 2 deletions
@@ -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");