Fix for-in iterator over array of boxed inline class values
#KT-25324 Fixed
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
inline class Foo(val arg: Int)
|
||||
|
||||
fun box(): String {
|
||||
val arr = arrayOf(Foo(1), Foo(2))
|
||||
var sum = 0
|
||||
for (el in arr) {
|
||||
sum += el.arg
|
||||
}
|
||||
|
||||
return if (sum != 3) "Fail" else "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user