diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java index 640f95d1438..ab17638b1e7 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java @@ -2758,6 +2758,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt"); } + @TestMetadata("resolveReferenceAgainstKFunctionAndKPrpoerty.kt") + public void testResolveReferenceAgainstKFunctionAndKPrpoerty() throws Exception { + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt"); + } + @TestMetadata("valVsFun.kt") public void testValVsFun() throws Exception { runTest("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt new file mode 100644 index 00000000000..9ef766b6132 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt @@ -0,0 +1,23 @@ +// FIR_IDENTICAL +// WITH_RUNTIME +// !DIAGNOSTICS: -UNUSED_PARAMETER + +fun foo(x: kotlin.reflect.KFunction1) {} +fun foo(x: kotlin.reflect.KProperty1) {} + +class Sample { + fun bar() {} + fun bar(x: Int) {} +} + +class A { + val foo = "hello" + fun foo(b: Boolean) = 1 +} + +fun test() { + foo(Sample::bar) + foo(String::toInt) + + foo(A::foo) +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.txt b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.txt new file mode 100644 index 00000000000..b36c45e8f96 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.txt @@ -0,0 +1,23 @@ +package + +public fun foo(/*0*/ x: kotlin.reflect.KFunction1): kotlin.Unit +public fun foo(/*0*/ x: kotlin.reflect.KProperty1): kotlin.Unit +public fun test(): kotlin.Unit + +public final class A { + public constructor A() + public final val foo: kotlin.String = "hello" + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(/*0*/ b: kotlin.Boolean): kotlin.Int + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class Sample { + public constructor Sample() + public final fun bar(): kotlin.Unit + public final fun bar(/*0*/ x: kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 27afec3600c..82b8bb57b76 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -2765,6 +2765,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt"); } + @TestMetadata("resolveReferenceAgainstKFunctionAndKPrpoerty.kt") + public void testResolveReferenceAgainstKFunctionAndKPrpoerty() throws Exception { + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt"); + } + @TestMetadata("valVsFun.kt") public void testValVsFun() throws Exception { runTest("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index 67b9b02678d..2f7d0852b39 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -2760,6 +2760,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt"); } + @TestMetadata("resolveReferenceAgainstKFunctionAndKPrpoerty.kt") + public void testResolveReferenceAgainstKFunctionAndKPrpoerty() throws Exception { + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/resolveReferenceAgainstKFunctionAndKPrpoerty.kt"); + } + @TestMetadata("valVsFun.kt") public void testValVsFun() throws Exception { runTest("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index fb9107dd922..4961b6d400c 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -9654,6 +9654,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/funInterface/multimodule.kt"); } + @TestMetadata("nonAbstractMethod.kt") + public void testNonAbstractMethod() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/nonAbstractMethod.kt"); + } + @TestMetadata("nullableSam.kt") public void testNullableSam() throws Exception { runTest("compiler/testData/codegen/box/funInterface/nullableSam.kt"); @@ -12621,6 +12626,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes public void testTostring() throws Exception { runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } + + @TestMetadata("trimMarginWithBlankString.kt") + public void testTrimMarginWithBlankString() throws Exception { + runTest("compiler/testData/codegen/box/intrinsics/trimMarginWithBlankString.kt"); + } } @TestMetadata("compiler/testData/codegen/box/ir")