Additional IEEE754-related tests for subject variable in 'when'
This commit is contained in:
+7
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user