From fb64e8bf7242989f841a8528cbceb3fd99a8609f Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Wed, 16 Oct 2024 15:51:55 +0300 Subject: [PATCH] Fix an error in the integration test with declaration redeclaration --- .../src/commonMain/kotlin/it/mpp0/ExpectedClass.kt | 4 ++++ .../src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt | 5 ----- .../src/desktopMain/kotlin/it/mpp0/ExpectedClass2.kt | 5 +++++ .../src/jsMain/kotlin/it/mpp0/ExpectedClass.kt | 4 ++++ .../src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt | 4 ++++ .../src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) delete mode 100644 dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt create mode 100644 dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass2.kt diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt index e610b09a05..3ba9ee9ad5 100644 --- a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt +++ b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/ExpectedClass.kt @@ -3,3 +3,7 @@ package it.mpp0 expect class ExpectedClass { val platform: String } + +expect class ExpectedClass2 { + val platform: String +} diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt deleted file mode 100644 index 19070a96fd..0000000000 --- a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass.kt +++ /dev/null @@ -1,5 +0,0 @@ -package it.mpp0 - -actual class ExpectedClass { - actual val platform: String = "linux" -} diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass2.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass2.kt new file mode 100644 index 0000000000..c6556acd97 --- /dev/null +++ b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/desktopMain/kotlin/it/mpp0/ExpectedClass2.kt @@ -0,0 +1,5 @@ +package it.mpp0 + +actual class ExpectedClass2 { + actual val platform: String = "desktop" +} diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt index 1e4a6d2274..877530ef3b 100644 --- a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt +++ b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/ExpectedClass.kt @@ -3,3 +3,7 @@ package it.mpp0 actual class ExpectedClass { actual val platform: String = "js" } + +actual class ExpectedClass2 { + actual val platform: String = "js" +} diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt index 6de30de68f..aad522be5e 100644 --- a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt +++ b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/ExpectedClass.kt @@ -9,3 +9,7 @@ actual class ExpectedClass { fun jvmOnlyFunction() = Unit } + +actual class ExpectedClass2 { + actual val platform: String = "jvm" +} diff --git a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt index 342a749e8e..2431544528 100644 --- a/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt +++ b/dokka-integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/CPointerExtension.kt @@ -6,6 +6,6 @@ import kotlinx.cinterop.CPointer /** * Will print the raw value */ -fun CPointer.customExtension() { +fun CPointer.customExtension2() { println(this.rawValue) }