Add test for KT-52762

This commit is contained in:
Mikhail Glukhikh
2022-06-17 16:14:14 +02:00
committed by Space
parent b7a215334e
commit 9fbafc3eb9
5 changed files with 34 additions and 0 deletions
@@ -6009,6 +6009,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/localScopesInAnonymousObject.kt");
}
@Test
@TestMetadata("NamedParameterInConcurrentMap.kt")
public void testNamedParameterInConcurrentMap() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/NamedParameterInConcurrentMap.kt");
}
@Test
@TestMetadata("qualifierPriority.kt")
public void testQualifierPriority() throws Exception {
@@ -0,0 +1,5 @@
FILE: NamedParameterInConcurrentMap.kt
public final fun main(): R|kotlin/Unit| {
lval map: R|java/util/concurrent/ConcurrentHashMap<kotlin/String, kotlin/String>| = R|java/util/concurrent/ConcurrentHashMap.ConcurrentHashMap|<R|kotlin/String|, R|kotlin/String|>()
R|<local>/map|.<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): java/util/concurrent/ConcurrentHashMap.put>#(key = String(key), value = String(value))
}
@@ -0,0 +1,11 @@
// FULL_JDK
import java.util.concurrent.ConcurrentHashMap
fun main() {
val map = ConcurrentHashMap<String, String>()
map.put(
<!NAMED_PARAMETER_NOT_FOUND!>key<!> = "key",
<!NAMED_PARAMETER_NOT_FOUND!>value<!> = "value"
<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>
}
@@ -6009,6 +6009,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/localScopesInAnonymousObject.kt");
}
@Test
@TestMetadata("NamedParameterInConcurrentMap.kt")
public void testNamedParameterInConcurrentMap() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/NamedParameterInConcurrentMap.kt");
}
@Test
@TestMetadata("qualifierPriority.kt")
public void testQualifierPriority() throws Exception {
@@ -6009,6 +6009,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/localScopesInAnonymousObject.kt");
}
@Test
@TestMetadata("NamedParameterInConcurrentMap.kt")
public void testNamedParameterInConcurrentMap() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/NamedParameterInConcurrentMap.kt");
}
@Test
@TestMetadata("qualifierPriority.kt")
public void testQualifierPriority() throws Exception {