[FIR] KT-54220: Don't crash on unsigned integers when no stdlib present

^KT-54220 Fixed
This commit is contained in:
Nikolay Lunyak
2022-11-04 09:57:09 +02:00
parent b03e14f565
commit 267ce1d892
23 changed files with 128 additions and 7 deletions
@@ -0,0 +1,14 @@
FILE: kt54220.kt
public final const val c: R|kotlin/UInt| = UInt(1).R|kotlin/UInt.plus|(UInt(2))
public get(): R|kotlin/UInt|
public final fun box(): R|kotlin/String| {
^box when () {
!=(R|/c|, UInt(3)) -> {
String(fail)
}
else -> {
String(OK)
}
}
}
@@ -0,0 +1,6 @@
const val c = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>1u + 2u<!>
fun box() = when {
c != 3u -> "fail"
else -> "OK"
}