JS: test local declaration deduplication with name clash; fix the test

This commit is contained in:
Anton Bannykh
2019-02-04 17:30:19 +03:00
parent 60aa6e4971
commit 990ee849e2
5 changed files with 70 additions and 0 deletions
@@ -0,0 +1,43 @@
// EXPECTED_REACHABLE_NODES: 1281
// FILE: 1.kt
package o
import I
inline fun run(): String {
return object : I {
override fun run() = "O"
}.run()
}
// FILE: 2.kt
package k
import I
inline fun run(): String {
return object : I {
override fun run() = "K"
}.run()
}
// FILE: 3.kt
fun ok() = o.run() + k.run()
// FILE: main.kt
interface I {
fun run(): String
}
fun box(): String {
if (ok() != "OK") return "fail"
return o.run() + k.run()
}