diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.kt new file mode 100644 index 00000000000..5814dff13fd --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.kt @@ -0,0 +1,4 @@ +inline fun foo(t: T): T { + val klass = T::class.java + return t +} \ No newline at end of file diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.txt new file mode 100644 index 00000000000..e01775fa3fb --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.txt @@ -0,0 +1,5 @@ +FILE: classLiteralForParameter.kt + public final inline fun foo(t: R|T|): R|T| { + lval klass: = (R|?|).# + ^foo R|/t| + } 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 96befac3c5b..57e504672de 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java @@ -582,6 +582,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); } + @TestMetadata("classLiteralForParameter.kt") + public void testClassLiteralForParameter() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.kt"); + } + @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/cloneArray.kt");