diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java index 99a7b2ae46f..8b4565290f7 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java @@ -1320,6 +1320,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFunInterface.kt"); } + @Test + @TestMetadata("expectedClassConstructorPropertyParameters.kt") + public void testExpectedClassConstructorPropertyParameters() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt"); + } + @Test @TestMetadata("explicitConstructorDelegation.kt") public void testExplicitConstructorDelegation() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java index 61f6fe4f882..b4cb32c6cb7 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java @@ -1320,6 +1320,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFunInterface.kt"); } + @Test + @TestMetadata("expectedClassConstructorPropertyParameters.kt") + public void testExpectedClassConstructorPropertyParameters() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt"); + } + @Test @TestMetadata("explicitConstructorDelegation.kt") public void testExplicitConstructorDelegation() throws Exception { diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.fir.kt new file mode 100644 index 00000000000..13017409bde --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.fir.kt @@ -0,0 +1,14 @@ +// DIAGNOSTICS: -NO_ACTUAL_FOR_EXPECT +// MODULE: m1-common +// FILE: common.kt +expect class Foo( + val constructorProperty: String, + var constructorVar: String, + constructorParameter: String, +) { + constructor(val notReported: String) +} + +expect annotation class Ann(val s: String) + +expect value class ValueClass(val s: String) diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt new file mode 100644 index 00000000000..323cc16e1c7 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt @@ -0,0 +1,14 @@ +// DIAGNOSTICS: -NO_ACTUAL_FOR_EXPECT +// MODULE: m1-common +// FILE: common.kt +expect class Foo( + val constructorProperty: String, + var constructorVar: String, + constructorParameter: String, +) { + constructor(val notReported: String) +} + +expect annotation class Ann(val s: String) + +expect value class ValueClass(val s: String) diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.fir.kt index 3c1dd101393..168dc2aebd8 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.fir.kt @@ -1,10 +1,7 @@ // IGNORE_REVERSED_RESOLVE // MODULE: m1-common // FILE: common.kt -expect class Foo( - val constructorProperty: String, - constructorParameter: String -) { +expect class Foo { init { "no" } diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt index 0ef4f7a64cc..6d9a411b4d4 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt @@ -1,10 +1,7 @@ // IGNORE_REVERSED_RESOLVE // MODULE: m1-common // FILE: common.kt -expect class Foo( - val constructorProperty: String, - constructorParameter: String -) { +expect class Foo { init { "no" } diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.txt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.txt index 5d45419bb36..61d3ae2342e 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.txt +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.txt @@ -3,8 +3,6 @@ package public final expect class Foo { public constructor Foo() public constructor Foo(/*0*/ s: kotlin.String) - public constructor Foo(/*0*/ constructorProperty: kotlin.String, /*1*/ constructorParameter: kotlin.String) - public expect final val constructorProperty: kotlin.String public expect final var getSet: kotlin.String public expect final val prop: kotlin.String = "no" public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -12,3 +10,4 @@ public final expect class Foo { 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-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 d99dac657ad..c9777c7116c 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 @@ -24321,6 +24321,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFunInterface.kt"); } + @Test + @TestMetadata("expectedClassConstructorPropertyParameters.kt") + public void testExpectedClassConstructorPropertyParameters() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectedClassConstructorPropertyParameters.kt"); + } + @Test @TestMetadata("explicitConstructorDelegation.kt") public void testExplicitConstructorDelegation() throws Exception {