[FIR] Allow treating candidates from the same non-source module as equivalent
This situation occurs in Native metadata compilation and lead to false-positive OVERLOAD_RESOLUTION_AMBIGUITY reports. #KT-61461 Fixed
This commit is contained in:
committed by
Space Team
parent
fd5ac8575c
commit
a42cb2f37f
+12
@@ -89,6 +89,18 @@ class CustomK2Tests : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled("disable until kotlin/native dependency is updated to include KT-61461")
|
||||
@GradleTest
|
||||
@DisplayName("Native metadata of intermediate with multiple targets. KT-61461")
|
||||
fun nativeMetadataOfIntermediateWithMultipleTargets(gradleVersion: GradleVersion) {
|
||||
with(project("k2-native-intermediate-multiple-targets", gradleVersion, buildOptions = defaultBuildOptions.copy(languageVersion = "2.0"))) {
|
||||
val taskToExecute = ":compileNativeMainKotlinMetadata"
|
||||
build(taskToExecute) {
|
||||
assertTasksExecuted(taskToExecute)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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")
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
group = "test"
|
||||
version = "1.0"
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
linuxX64()
|
||||
macosX64()
|
||||
macosArm64()
|
||||
mingwX64()
|
||||
androidNativeX64()
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
fun foo() {
|
||||
require(true)
|
||||
for (i in 0 until 42) {}
|
||||
}
|
||||
|
||||
private val mutexPool by lazy { 42 }
|
||||
Reference in New Issue
Block a user