[JS IR] Add a test case with same names for private val

The test case checks, that KT-44728 has been already fixed
This commit is contained in:
Alexander Korepanov
2021-12-14 10:58:47 +03:00
committed by Space
parent 7b60c0427e
commit f99b80c8d2
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,22 @@
// FILE: file1.kt
package foo
private val jsObject: dynamic = js("{str: 'File1Str'}")
private val fileString: String = jsObject.str
fun file1Fun() = fileString
// FILE: file2.kt
package foo
private val jsObject: dynamic = js("{str: 'File2Str'}")
private val fileString: String = jsObject.str
fun file2Fun() = fileString
// FILE: box.kt
package foo
fun box(): String {
assertEquals(file1Fun(), "File1Str")
assertEquals(file2Fun(), "File2Str")
return "OK"
}