[FIR] KT-58145: Ensure the compiler fails
It fails with: "Module data is not registered in Libraries session" during `FirFakeOverrideGenerator.createCopyForFirProperty()` for `callerFrame`.
This commit is contained in:
committed by
Space Team
parent
efbcfb4994
commit
ef28e031dc
+12
@@ -73,4 +73,16 @@ class CustomK2Tests : KGPBaseTest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Disabled("disable until kotlin/native dependency is updated to include KT-58145")
|
||||||
|
@GradleTest
|
||||||
|
@DisplayName("Compiling shared native source with FirFakeOverrideGenerator referencing a common entity. KT-58145")
|
||||||
|
fun kt581450MppNativeSharedCrash(gradleVersion: GradleVersion) {
|
||||||
|
with(project("kt-581450-mpp-native-shared-crash", gradleVersion, buildOptions = defaultBuildOptions.copy(languageVersion = "2.0"))) {
|
||||||
|
val taskToExecute = ":compileNativeMainKotlinMetadata"
|
||||||
|
build(taskToExecute) {
|
||||||
|
assertTasksExecuted(taskToExecute)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||||
|
|
||||||
|
group = "test"
|
||||||
|
version = "1.0"
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("multiplatform")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
linuxX64()
|
||||||
|
linuxArm64()
|
||||||
|
sourceSets {
|
||||||
|
val commonMain by getting
|
||||||
|
val jvmMain by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
val nativeMain by creating {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
val linuxX64Main by getting {
|
||||||
|
dependsOn(nativeMain)
|
||||||
|
}
|
||||||
|
val linuxArm64Main by getting {
|
||||||
|
dependsOn(nativeMain)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
||||||
|
compilerOptions {
|
||||||
|
freeCompilerArgs.add("-Xrender-internal-diagnostic-names")
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
open class ScopeCoroutine<T> {
|
||||||
|
val callerFrame: Any? = null
|
||||||
|
}
|
||||||
|
|
||||||
|
expect class UndispatchedCoroutine<T>(): ScopeCoroutine<T>
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual class UndispatchedCoroutine<T>: ScopeCoroutine<T>()
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun main() {
|
||||||
|
println("Hello, linuxArm64!")
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun main() {
|
||||||
|
println("Hello, linuxX64!")
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual class UndispatchedCoroutine<T>: ScopeCoroutine<T>()
|
||||||
Reference in New Issue
Block a user