Revert "rra/zhelenskiy/flattening_impl"

This reverts commit b7f5c039a6.
This commit is contained in:
Evgeniy.Zhelenskiy
2022-10-07 12:40:25 +02:00
committed by teamcity
parent dff949344d
commit d4969e9b97
64 changed files with 332 additions and 15451 deletions
@@ -1,27 +0,0 @@
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
// CHECK_BYTECODE_LISTING
@JvmInline
value class DPoint(val x: Double, val y: Double)
class A(var x: DPoint) {
init { x = DPoint(2.0, 3.0) }
}
class B() {
var a = DPoint(4.0, 5.0)
val b = a
init { a = DPoint(6.0, 7.0) }
val c = a
}
fun box(): String {
require(A(DPoint(0.0, 1.0)).x == DPoint(2.0, 3.0)) { "No init used" }
require(B().a == DPoint(6.0, 7.0)) { "No init used" }
require(B().b == DPoint(4.0, 5.0)) { "Wrong init order used" }
require(B().c == DPoint(6.0, 7.0)) { "Wrong init order used" }
return "OK"
}