[FIR] Don't run platform checkers during compilation to metadata
^KT-57376 Fixed
This commit is contained in:
committed by
Space Team
parent
b6f669189b
commit
88d61173b6
+1
-5
@@ -102,11 +102,7 @@ object FirCommonSessionFactory : FirAbstractSessionFactory() {
|
||||
it.registerDefaultExtraComponentsForModuleBased()
|
||||
registerExtraComponents(it)
|
||||
},
|
||||
registerExtraCheckers = {
|
||||
it.registerJvmCheckers()
|
||||
it.registerJsCheckers()
|
||||
it.registerNativeCheckers()
|
||||
},
|
||||
registerExtraCheckers = {},
|
||||
createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } },
|
||||
createProviders = { session, kotlinScopeProvider, symbolProvider, syntheticFunctionalInterfaceProvider, generatedSymbolsProvider, dependencies ->
|
||||
var symbolProviderForBinariesFromIncrementalCompilation: MetadataSymbolProvider? = null
|
||||
|
||||
+11
@@ -51,4 +51,15 @@ class CustomK2Tests : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("HMPP compilation without JS target. KT-57376")
|
||||
fun testHmppCompilationWithoutJsTarget(gradleVersion: GradleVersion) {
|
||||
with(project("k2-mpp-without-js", gradleVersion)) {
|
||||
val taskToExecute = ":compileIntermediateMainKotlinMetadata"
|
||||
build(taskToExecute) {
|
||||
assertTasksExecuted(taskToExecute)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
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()
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {}
|
||||
|
||||
val intermediateMain by creating {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
|
||||
val jvmMain by getting {
|
||||
dependsOn(intermediateMain)
|
||||
}
|
||||
|
||||
val linuxX64Main by getting {
|
||||
dependsOn(intermediateMain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xrender-internal-diagnostic-names")
|
||||
with(project.providers) {
|
||||
languageVersion.set(KotlinVersion.fromVersion("2.0"))
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// ISSUE: KT-57376
|
||||
package kt57376
|
||||
|
||||
expect interface A {
|
||||
fun invoke(cause: Throwable?)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// ISSUE: KT-57376
|
||||
package kt57376
|
||||
|
||||
actual interface A: (Throwable?) -> Unit {
|
||||
actual override fun invoke(cause: Throwable?)
|
||||
}
|
||||
Reference in New Issue
Block a user