[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) {
|
||||
nameBuilder.append('.')
|
||||
nameBuilder.append(getNameForDeclaration(declaration.parent as IrDeclaration, context))
|
||||
} else {
|
||||
nameDeclarator = context.staticContext.rootScope::declareFreshName
|
||||
}
|
||||
}
|
||||
is IrClass -> {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class C
|
||||
|
||||
object O : C()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
public open class TestDelegate<T: Any>(private val initializer: () -> T) {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1285
|
||||
// FILE: foo.kt
|
||||
package foo
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1282
|
||||
// FILE: a.kt
|
||||
package foo
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1284
|
||||
package foo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user