[FIR] KT-54692: Fix compiler crash on UInt.shl

Merge-request: KT-MR-7513
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
Nikolay Lunyak
2022-10-27 10:40:06 +00:00
committed by Space Team
parent 34478b84cd
commit 7e323f8ac6
14 changed files with 86 additions and 4 deletions
@@ -0,0 +1,25 @@
// WITH_STDLIB
fun test(): Int {
return 1 shl 12
}
fun rest(): UInt {
return 1u shl 20
}
fun fest(): Long {
return 1L shl 12
}
fun mest(): ULong {
return 1uL shl 20
}
fun box(): String = when {
test() != 4096 -> "fail: test"
rest() != 1_048_576u -> "fail: rest"
fest() != 4096L -> "fail: fest"
mest() != 1_048_576uL -> "fail: mest"
else -> "OK"
}