diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 2bb669b8cf7..b09d8b2a7a1 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -14972,6 +14972,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag public void testKt55931() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt55931.kt"); } + + @Test + @TestMetadata("kt56227.kt") + public void testKt56227() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt"); + } } @Nested diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 6ed7b4748ee..66af377109b 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -14978,6 +14978,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testKt55931() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt55931.kt"); } + + @Test + @TestMetadata("kt56227.kt") + public void testKt56227() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt"); + } } @Nested diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index d19114b2a54..e7336fea5fd 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -14972,6 +14972,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac public void testKt55931() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt55931.kt"); } + + @Test + @TestMetadata("kt56227.kt") + public void testKt56227() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt"); + } } @Nested diff --git a/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt b/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt new file mode 100644 index 00000000000..a504d76dd7e --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt @@ -0,0 +1,30 @@ +// FIR_IDENTICAL +// WITH_REFLECT +import kotlin.reflect.KProperty0 + +data class MyPattern( + val name: String, + val conservation: String?, + val awake: Double, + val brainwt: Double?, + val bodywt: Double, +) + + +internal inline fun Iterable.ggplot4( + x: T.() -> KProperty0<*>, + y: T.() -> KProperty0<*>, +) { + // build df from data + val map = map { x(it) to y(it) } + map.first().first.name + + TODO("do something meaningful") +} + +fun main() { + listOf().ggplot4( + x = { ::conservation }, + y = { ::bodywt } + ) +} diff --git a/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.txt b/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.txt new file mode 100644 index 00000000000..3778f8b45be --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.txt @@ -0,0 +1,22 @@ +package + +public fun main(): kotlin.Unit +internal inline fun kotlin.collections.Iterable.ggplot4(/*0*/ x: T.() -> kotlin.reflect.KProperty0<*>, /*1*/ y: T.() -> kotlin.reflect.KProperty0<*>): kotlin.Unit + +public final data class MyPattern { + public constructor MyPattern(/*0*/ name: kotlin.String, /*1*/ conservation: kotlin.String?, /*2*/ awake: kotlin.Double, /*3*/ brainwt: kotlin.Double?, /*4*/ bodywt: kotlin.Double) + public final val awake: kotlin.Double + public final val bodywt: kotlin.Double + public final val brainwt: kotlin.Double? + public final val conservation: kotlin.String? + public final val name: kotlin.String + public final operator /*synthesized*/ fun component1(): kotlin.String + public final operator /*synthesized*/ fun component2(): kotlin.String? + public final operator /*synthesized*/ fun component3(): kotlin.Double + public final operator /*synthesized*/ fun component4(): kotlin.Double? + public final operator /*synthesized*/ fun component5(): kotlin.Double + public final /*synthesized*/ fun copy(/*0*/ name: kotlin.String = ..., /*1*/ conservation: kotlin.String? = ..., /*2*/ awake: kotlin.Double = ..., /*3*/ brainwt: kotlin.Double? = ..., /*4*/ bodywt: kotlin.Double = ...): MyPattern + public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 4335bd340df..95264f56c6c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -14978,6 +14978,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testKt55931() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt55931.kt"); } + + @Test + @TestMetadata("kt56227.kt") + public void testKt56227() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/callableReferences/kt56227.kt"); + } } @Nested