Fix performance regression in NI by fixing totally incorrect hashCode
The actual problem was introduced in4f1e85b468, note how `hashCode` is implemented: ``` var currentHashCode = cachedHashCode if (currentHashCode == 0) return currentHashCode ... ``` It's a silly bug, there should be check `if (currentHashCode != 0) ...` because `0` is used a marker for "uncomputed value". Now, in the commit0219b86d06I added map with `KotlinType` as a key and because of constant `hash` for `KotlinType`, we basically got `List` instead of `Map`, which caused this performance regression #KT-34063 Fixed
This commit is contained in:
@@ -10131,6 +10131,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/lessSpecificTypeForArgumentCallWithExactAnnotation_ni.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("manyArgumentsForVararg.kt")
|
||||
public void testManyArgumentsForVararg() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/manyArgumentsForVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt");
|
||||
|
||||
Reference in New Issue
Block a user