KT-35004: keep track of KotlinType for 'when' subject

This commit is contained in:
Dmitry Petrov
2019-11-20 13:08:13 +03:00
parent 338b4e2eab
commit d3a5dcb601
8 changed files with 43 additions and 2 deletions
@@ -0,0 +1,11 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME
fun ULong.foobar() =
when (this) {
in 0U..1U -> "OK"
else -> throw AssertionError("$this")
}
fun box(): String = 0UL.foobar()