[IR] Add context receivers test, fix a flattening fields bug
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com> #KT-1179
This commit is contained in:
committed by
teamcity
parent
e1f886936c
commit
9dd308dc01
@@ -0,0 +1,18 @@
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class DPoint(val x: Double, val y: Double)
|
||||
|
||||
fun box(): String {
|
||||
var res = 0.0
|
||||
for (x in listOf(DPoint(1.0, 2.0), DPoint(3.0, 4.0))) {
|
||||
res += x.x + x.y
|
||||
}
|
||||
require(res == 10.0)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user