| // KT-54635: Kotlin/JS cannot distinguish between Int and Double at runtime | |
| // AssertionError: Expected value to be false. | |
| // IGNORE_BACKEND: JS_IR, JS_IR_ES6 | |
| // WITH_STDLIB | |
| // FILE: lib.kt | |
| @Suppress("NOTHING_TO_INLINE") | |
| inline fun <reified T> foo (i2: Any): Boolean { | |
| return i2 is T | |
| } | |
| // FILE: main.kt | |
| import kotlin.test.* | |
| fun bar(i1: Int): Boolean { | |
| return foo<Double>(i1) | |
| } | |
| fun box(): String { | |
| assertFalse(bar(1)) | |
| return "OK" | |
| } |