[FIR] Search for typealias in dependencies, if expect class was found first
^KT-65840 Fixed
This commit is contained in:
committed by
Space Team
parent
c3c2f6f90a
commit
eb85caedad
+10
@@ -220,6 +220,16 @@ class CustomK2Tests : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Native metadata compilation against other klib (KT-65840)")
|
||||
fun nativeMetadataCompilationWithAgainstOtherKlib(gradleVersion: GradleVersion) {
|
||||
project("k2-common-native-against-other-klib", gradleVersion) {
|
||||
build(":app:compileNativeMainKotlinMetadata") {
|
||||
assertTasksExecuted(":app:compileNativeMainKotlinMetadata")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NativeGradlePluginTests
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(project(":lib"))
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun test() {
|
||||
val s: Some = createSome()
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
|
||||
group = "test"
|
||||
version = "1.0"
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply {
|
||||
plugin("kotlin-multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
linuxX64()
|
||||
macosX64()
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xrender-internal-diagnostic-names")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class Some {
|
||||
fun foo()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Other {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
actual typealias Some = Other
|
||||
|
||||
fun createSome(): Some = Other()
|
||||
+1
@@ -0,0 +1 @@
|
||||
include(":app", ":lib")
|
||||
Reference in New Issue
Block a user