[JS IR BE] Fix name clash between top-level fields
This commit is contained in:
+2
@@ -132,6 +132,8 @@ class SimpleNameGenerator : NameGenerator {
|
|||||||
if (declaration.parent is IrDeclaration) {
|
if (declaration.parent is IrDeclaration) {
|
||||||
nameBuilder.append('.')
|
nameBuilder.append('.')
|
||||||
nameBuilder.append(getNameForDeclaration(declaration.parent as IrDeclaration, context))
|
nameBuilder.append(getNameForDeclaration(declaration.parent as IrDeclaration, context))
|
||||||
|
} else {
|
||||||
|
nameDeclarator = context.staticContext.rootScope::declareFreshName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is IrClass -> {
|
is IrClass -> {
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
open class C
|
open class C
|
||||||
|
|
||||||
object O : C()
|
object O : C()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
public open class TestDelegate<T: Any>(private val initializer: () -> T) {
|
public open class TestDelegate<T: Any>(private val initializer: () -> T) {
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
// EXPECTED_REACHABLE_NODES: 1285
|
// EXPECTED_REACHABLE_NODES: 1285
|
||||||
// FILE: foo.kt
|
// FILE: foo.kt
|
||||||
package foo
|
package foo
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
// EXPECTED_REACHABLE_NODES: 1282
|
// EXPECTED_REACHABLE_NODES: 1282
|
||||||
// FILE: a.kt
|
// FILE: a.kt
|
||||||
package foo
|
package foo
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
// EXPECTED_REACHABLE_NODES: 1284
|
// EXPECTED_REACHABLE_NODES: 1284
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user