Fix code generation for Array<C> element access where C is inline class
This commit is contained in:
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// WITH_UNSIGNED
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
|
||||
|
||||
inline class Data(val data: Array<UInt>)
|
||||
|
||||
val D =
|
||||
Array(4) { i ->
|
||||
Data(Array(4) { j ->
|
||||
(i + j).toUInt()
|
||||
})
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
for (i in D.indices) {
|
||||
for (j in D[i].data.indices) {
|
||||
val x = D[i].data[j].toInt()
|
||||
if (x != i + j) throw AssertionError()
|
||||
}
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user