diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java index bb644a4ee78..20e239ca1a6 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java @@ -4967,6 +4967,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.kt"); } + @Test + @TestMetadata("getClassLet.kt") + public void testGetClassLet() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt"); + } + @Test @TestMetadata("kt41917.kt") public void testKt41917() throws Exception { diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.fir.txt new file mode 100644 index 00000000000..b9f07dc83bf --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.fir.txt @@ -0,0 +1,20 @@ +FILE: getClassLet.kt + public final class SomeClass : R|kotlin/Any| { + public constructor(): R|SomeClass| { + super() + } + + } + public final inline fun foo(klass: R|kotlin/reflect/KClass<*>|): R|K| { + ^foo Null(null)!! + } + public final val some: R|kotlin/collections/Map|by R|kotlin/lazy||>( = lazy@fun (): R|kotlin/collections/Map| { + ^ (Q|SomeClass|).R|kotlin/let||, R|kotlin/collections/Map|>( = let@fun (it: R|kotlin/reflect/KClass|): R|kotlin/collections/Map| { + ^ R|/foo||>(R|/it|) + } + ) + } + ) + public get(): R|kotlin/collections/Map| { + ^ D|/some|.R|kotlin/getValue||>(Null(null), ::R|/some|) + } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt new file mode 100644 index 00000000000..eddaa96d694 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt @@ -0,0 +1,11 @@ +import kotlin.reflect.KClass + +class SomeClass + +inline fun foo(klass: KClass<*>): K = null!! + +val some: Map by lazy { + SomeClass::class.let { + foo(it) + } +} diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java index 808bdf7b5e2..2b2ebd4717e 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java @@ -4967,6 +4967,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.kt"); } + @Test + @TestMetadata("getClassLet.kt") + public void testGetClassLet() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt"); + } + @Test @TestMetadata("kt41917.kt") public void testKt41917() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java index 0758f6661eb..5d1ab00b6e5 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java @@ -4967,6 +4967,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.kt"); } + @Test + @TestMetadata("getClassLet.kt") + public void testGetClassLet() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/getClassLet.kt"); + } + @Test @TestMetadata("kt41917.kt") public void testKt41917() throws Exception { diff --git a/compiler/testData/codegen/box/inference/builderInference/kt48445.kt b/compiler/testData/codegen/box/inference/builderInference/kt48445.kt index fd6d8078746..6f2de7e3bc2 100644 --- a/compiler/testData/codegen/box/inference/builderInference/kt48445.kt +++ b/compiler/testData/codegen/box/inference/builderInference/kt48445.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference +// IGNORE_BACKEND_FIR: JVM_IR // FIR status: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER on lazy call (Name3, T) // WITH_STDLIB