[FIR] Search for typealias in dependencies, if expect class was found first

^KT-65840 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-25 10:23:34 +02:00
committed by Space Team
parent c3c2f6f90a
commit eb85caedad
9 changed files with 89 additions and 1 deletions
@@ -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
@@ -0,0 +1,7 @@
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":lib"))
}
}
}
@@ -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")
}
}
}
@@ -0,0 +1,7 @@
class Other {
fun foo() {}
}
actual typealias Some = Other
fun createSome(): Some = Other()