cb3b1f8ae2
Fixed by outlining JS code that uses Kotlin variables making usages of these locals explicit and preventing bugs due to one-sided variable renaming. This prevents using Kotlin variables as lvalue in JS code.
21 lines
311 B
Kotlin
Vendored
21 lines
311 B
Kotlin
Vendored
// EXPECTED_REACHABLE_NODES: 1282
|
|
// IGNORE_BACKEND: JS_IR
|
|
package foo
|
|
|
|
fun box(): String {
|
|
var c: Int = 0
|
|
|
|
js("""
|
|
for (var i = 1; i < 6; i++) {
|
|
if (i % 2 === 0) {
|
|
continue;
|
|
}
|
|
|
|
c++;
|
|
}
|
|
""")
|
|
|
|
assertEquals(3, c)
|
|
|
|
return "OK"
|
|
} |