[IR] Fix name clash between properties with the same fqn
Promote ABI version
This commit is contained in:
+1
-2
@@ -203,8 +203,7 @@ abstract class KotlinManglerImpl: KotlinMangler {
|
|||||||
|
|
||||||
val parentDeclaration = (parent as? IrSimpleFunction)?.correspondingPropertySymbol?.owner ?: parent
|
val parentDeclaration = (parent as? IrSimpleFunction)?.correspondingPropertySymbol?.owner ?: parent
|
||||||
val containingDeclarationPart = when (parentDeclaration) {
|
val containingDeclarationPart = when (parentDeclaration) {
|
||||||
is IrDeclarationParent -> parentDeclaration.fqNameUnique.asString()
|
is IrDeclaration -> parentDeclaration.uniqSymbolName()
|
||||||
is IrProperty -> "${parentDeclaration.parent.fqNameUnique}.${parentDeclaration.name}"
|
|
||||||
else -> error("Unexpected type parameter parent")
|
else -> error("Unexpected type parameter parent")
|
||||||
}
|
}
|
||||||
return "ktypeparam:$containingDeclarationPart$name@$index"
|
return "ktypeparam:$containingDeclarationPart$name@$index"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// FILE: common.kt
|
// FILE: common.kt
|
||||||
|
|
||||||
class C<T>(var t: T)
|
class C<T>(var t: T)
|
||||||
|
class G<T>(var t: T)
|
||||||
|
|
||||||
var <T> C<T>.live: T
|
var <T> C<T>.live: T
|
||||||
get() {
|
get() {
|
||||||
@@ -12,16 +13,25 @@ var <T> C<T>.live: T
|
|||||||
t = value
|
t = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var <T> G<T>.live: T
|
||||||
|
get() {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
set(value) {
|
||||||
|
t = value
|
||||||
|
}
|
||||||
|
|
||||||
// MODULE: main(lib)
|
// MODULE: main(lib)
|
||||||
// FILE: main.kt
|
// FILE: main.kt
|
||||||
import kotlin.reflect.KMutableProperty0
|
import kotlin.reflect.KMutableProperty0
|
||||||
|
|
||||||
fun qux(text: KMutableProperty0<String>): String {
|
fun qux(text: KMutableProperty0<String>, s: String): String {
|
||||||
text.set("OK")
|
text.set(s)
|
||||||
return text.get()
|
return text.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val c = C("FAIL")
|
val c = C("FAIL_C")
|
||||||
return qux(c::live)
|
val g = G("FAIL_G")
|
||||||
|
return qux(c::live, "O") + qux(g::live, "K")
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ fun String.parseKonanAbiVersion(): KotlinAbiVersion {
|
|||||||
|
|
||||||
data class KotlinAbiVersion(val version: Int) {
|
data class KotlinAbiVersion(val version: Int) {
|
||||||
companion object {
|
companion object {
|
||||||
val CURRENT = KotlinAbiVersion(12)
|
val CURRENT = KotlinAbiVersion(13)
|
||||||
}
|
}
|
||||||
override fun toString() = "$version"
|
override fun toString() = "$version"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user