3dc58bc995
This commit fixes two issues in the existing implementation of translating primitive array types: * IrType.getArrayElementType throws an exception when the receiver is a primitive array type, because IR expects primitive array types use symbols defined in IrBuiltIns, but fir2ir translation doesn't; * IteratorNext.toCallable assumes all element types are boxed. The first issue is fixed by changing the fir2ir type translation to use symbols in IrBuiltIns for primitive array types, and the second by not unboxing primitive types.
22 lines
329 B
Kotlin
Vendored
22 lines
329 B
Kotlin
Vendored
fun test1(): Boolean {
|
|
test1@ for(i in 1..2) {
|
|
continue@test1
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
fun test2(): Boolean {
|
|
test2@ while (true) {
|
|
break@test2
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
fun box(): String {
|
|
if (!test1()) return "fail test1"
|
|
if (!test2()) return "fail test2"
|
|
return "OK"
|
|
} |