[FIR2IR] Fix translating primitive array types

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.
This commit is contained in:
Juan Chen
2019-12-20 10:39:38 -08:00
committed by Mikhail Glukhikh
parent 1cf582e9ed
commit 3dc58bc995
52 changed files with 65 additions and 71 deletions

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box() : String {
val a = IntArray (5)
var i = 0