FE: add new tests around unresolved integer literals

Related to KT-57487, KT-57703
This commit is contained in:
Mikhail Glukhikh
2023-03-29 17:31:07 +02:00
committed by Space Team
parent 70c5978add
commit 27c4a7b7ef
13 changed files with 129 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// (type mismatch)
// IGNORE_BACKEND_K2: JVM_IR
// (CCE in select)
// WITH_STDLIB
fun <A : Comparable<A>> arrayData(vararg values: A): A = values.first()
fun test(b: Byte) = select(arrayData(1), b)
fun <S : Comparable<S>> select(a: S, b: S): S {
if (a.compareTo(b) > 0) return a else return b
}
fun box(): String {
val res = test(-42)
val res2 = res.dec()
res.doSomething()
if (res == 1.toByte() && res2 == 0.toByte()) return "OK" else return res.toString()
}
fun Byte.doSomething() {}