diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.kt new file mode 100644 index 00000000000..0c028cadf13 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.kt @@ -0,0 +1,10 @@ +// FULL_JDK + +import java.util.* + +val someMap = WeakHashMap() + +fun foo() { + someMap[""] +} + diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.txt new file mode 100644 index 00000000000..a1f45ce9e1e --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.txt @@ -0,0 +1,6 @@ +FILE: weakHashMap.kt + public final val someMap: R|java/util/WeakHashMap| = R|java/util/WeakHashMap.WeakHashMap|() + public get(): R|java/util/WeakHashMap| + public final fun foo(): R|kotlin/Unit| { + R|/someMap|.#(String()) + } diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java index dcaae0ff01b..2a3cb8dd876 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java @@ -591,5 +591,10 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic public void testTryWithLambdaInside() throws Exception { runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/tryWithLambdaInside.kt"); } + + @TestMetadata("weakHashMap.kt") + public void testWeakHashMap() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/weakHashMap.kt"); + } } }