JS: make tests dependent on primitive array is checks pass even when -Xtypedarray is disabled (related: KT-17137)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
@@ -14,6 +13,9 @@ fun test(x: Any): Int {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
// Only run this test if primitive array `is` checks work (KT-17137)
|
||||
if ((intArrayOf() as Any) is Array<*>) return "OK"
|
||||
|
||||
assertEquals(123, test(intArrayOf(0, 0, 0, 0)))
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user