Additional IEEE754-related tests for subject variable in 'when'

This commit is contained in:
Dmitry Petrov
2018-06-19 14:32:13 +03:00
parent 34b76a3718
commit 6194cfc782
2 changed files with 27 additions and 0 deletions
@@ -2,6 +2,7 @@
// IGNORE_BACKEND: JS
val az: Any = -0.0
val afz: Any = -0.0f
fun box(): String {
when (val y = az) {
@@ -10,5 +11,11 @@ fun box(): String {
else -> throw AssertionError()
}
when (val y = afz) {
!is Float -> throw AssertionError()
0.0 -> {}
else -> throw AssertionError()
}
return "OK"
}