Revert "rra/zhelenskiy/flattening_impl"
This reverts commit b7f5c039a6.
This commit is contained in:
committed by
teamcity
parent
71381ec8e2
commit
93ffd9f233
+6
-143
@@ -1,9 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses +ContextReceivers
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class IC(val x: UInt)
|
||||
@@ -11,148 +9,13 @@ value class IC(val x: UInt)
|
||||
fun ic(x: IC) = x.x
|
||||
|
||||
@JvmInline
|
||||
value class SimpleMfvc(val x: UInt, val y: IC, val z: String) {
|
||||
companion object {
|
||||
val SimpleMfvc.a1: SimpleMfvc
|
||||
get() = this
|
||||
value class SimpleMFVC(val x: UInt, val y: IC, val z: String)
|
||||
|
||||
@JvmStatic
|
||||
val SimpleMfvc.b1: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
val a2: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
@JvmStatic
|
||||
val b2: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
|
||||
private val SimpleMfvc.private1: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
@JvmStatic
|
||||
private val SimpleMfvc.private2: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
private val private3: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
@JvmStatic
|
||||
private val private4: SimpleMfvc
|
||||
get() = this@b
|
||||
}
|
||||
|
||||
val SimpleMfvc.a3: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
context(SimpleMfvc)
|
||||
val b3: SimpleMfvc
|
||||
get() = this@SimpleMfvc
|
||||
|
||||
|
||||
private val SimpleMfvc.private1: SimpleMfvc
|
||||
get() = this@SimpleMfvc
|
||||
context(SimpleMfvc)
|
||||
private val private2: SimpleMfvc
|
||||
get() = this@SimpleMfvc
|
||||
}
|
||||
|
||||
fun smfvc(ic: IC, x: SimpleMfvc, ic1: UInt) = ic(ic) + x.x + ic(x.y) + ic1
|
||||
fun smfvc(ic: IC, x: SimpleMFVC, ic1: UInt) = ic(ic) + x.x + ic(x.y) + ic1
|
||||
|
||||
@JvmInline
|
||||
value class GreaterMfvc(val x: SimpleMfvc, val y: IC, val z: SimpleMfvc)
|
||||
value class GreaterMFVC(val x: SimpleMFVC, val y: IC, val z: SimpleMFVC)
|
||||
|
||||
fun gmfvc(ic: IC, x: GreaterMfvc, ic1: UInt) = smfvc(ic, x.x, 0U) + ic(x.y) + smfvc(IC(0U), x.z, ic1)
|
||||
fun gmfvc(ic: IC, x: GreaterMFVC, ic1: UInt) = smfvc(ic, x.x, 0U) + ic(x.y) + smfvc(IC(0U), x.z, ic1)
|
||||
|
||||
class Extensions {
|
||||
val SimpleMfvc.x1: SimpleMfvc
|
||||
get() = this
|
||||
private val SimpleMfvc.private_: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
companion object {
|
||||
val SimpleMfvc.y1: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
@JvmStatic
|
||||
val SimpleMfvc.z1: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
private val SimpleMfvc.private1: SimpleMfvc
|
||||
get() = this
|
||||
|
||||
@JvmStatic
|
||||
private val SimpleMfvc.private2: SimpleMfvc
|
||||
get() = this
|
||||
}
|
||||
}
|
||||
|
||||
class Contexts {
|
||||
context(b@SimpleMfvc)
|
||||
val x1: SimpleMfvc
|
||||
get() = this@b
|
||||
context(b@SimpleMfvc)
|
||||
private val private_: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
companion object {
|
||||
context(b@SimpleMfvc)
|
||||
val y1: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
@JvmStatic
|
||||
val z1: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
private val private1: SimpleMfvc
|
||||
get() = this@b
|
||||
|
||||
context(b@SimpleMfvc)
|
||||
@JvmStatic
|
||||
private val private2: SimpleMfvc
|
||||
get() = this@b
|
||||
}
|
||||
}
|
||||
|
||||
fun idUnboxed(x: SimpleMfvc) = x
|
||||
fun idBoxed(x: SimpleMfvc?) = x!!
|
||||
|
||||
fun box(): String {
|
||||
val o1 = IC(2U)
|
||||
require(ic(o1) == 2U)
|
||||
val o2 = SimpleMfvc(1U, o1, "3")
|
||||
val o2_ = SimpleMfvc(1U, o1, "-3")
|
||||
require(smfvc(IC(4U), o2, 5U) == 12U)
|
||||
val o3 = GreaterMfvc(o2, IC(6U), SimpleMfvc(7U, IC(8U), "9"))
|
||||
require(gmfvc(IC(10U), o3, 11U) == 45U)
|
||||
with(Extensions()) {
|
||||
require(o2.x1 == o2)
|
||||
}
|
||||
with(Extensions.Companion) {
|
||||
require(o2.y1 == o2)
|
||||
require(o2.z1 == o2)
|
||||
}
|
||||
with(o2) {
|
||||
require(Contexts().x1 == o2)
|
||||
require(Contexts.y1 == o2)
|
||||
require(Contexts.z1 == o2)
|
||||
require(o2_.a3 == o2_)
|
||||
require(o2_.b3 == o2_)
|
||||
require(SimpleMfvc.a2 == o2)
|
||||
require(SimpleMfvc.b2 == o2)
|
||||
}
|
||||
with(SimpleMfvc.Companion) {
|
||||
require(o2_.a1 == o2_)
|
||||
require(o2_.b1 == o2_)
|
||||
}
|
||||
|
||||
require(idUnboxed(idBoxed(idUnboxed(o2) /*boxing*/) /*unbox*/) == o2)
|
||||
return "OK"
|
||||
}
|
||||
fun box() = "OK" // todo real test
|
||||
@@ -1,175 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
public final class ClassFlatteningKt {
|
||||
// source: 'classFlattening.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static method gmfvc-Ket90g4(p0: int, p1: int, p2: int, @org.jetbrains.annotations.NotNull p3: java.lang.String, p4: int, p5: int, p6: int, @org.jetbrains.annotations.NotNull p7: java.lang.String, p8: int): int
|
||||
public final static method ic-K5cTq2M(p0: int): int
|
||||
public final static @org.jetbrains.annotations.NotNull method idBoxed(@org.jetbrains.annotations.Nullable p0: SimpleMfvc): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method idUnboxed-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final static method smfvc-Ket90g4(p0: int, p1: int, p2: int, @org.jetbrains.annotations.NotNull p3: java.lang.String, p4: int): int
|
||||
public final inner class Contexts$Companion
|
||||
public final inner class Extensions$Companion
|
||||
public final inner class SimpleMfvc$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Contexts$Companion {
|
||||
// source: 'classFlattening.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic final static method access$getPrivate2-sUp7gFk(p0: Contexts$Companion, p1: int, p2: int, p3: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate1-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getPrivate2$annotations(): void
|
||||
private final method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getY1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getZ1$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getZ1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final inner class Contexts$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Contexts {
|
||||
// source: 'classFlattening.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: Contexts$Companion
|
||||
static method <clinit>(): void
|
||||
public method <init>(): void
|
||||
private final static method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate_-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getX1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method getZ1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final inner class Contexts$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Extensions$Companion {
|
||||
// source: 'classFlattening.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic final static method access$getPrivate2-sUp7gFk(p0: Extensions$Companion, p1: int, p2: int, p3: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate1-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getPrivate2$annotations(p0: SimpleMfvc): void
|
||||
private final method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getY1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getZ1$annotations(p0: SimpleMfvc): void
|
||||
public final @org.jetbrains.annotations.NotNull method getZ1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final inner class Extensions$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Extensions {
|
||||
// source: 'classFlattening.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: Extensions$Companion
|
||||
static method <clinit>(): void
|
||||
public method <init>(): void
|
||||
private final static method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate_-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getX1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method getZ1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final inner class Extensions$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class GreaterMfvc {
|
||||
// source: 'classFlattening.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-0-2: java.lang.String
|
||||
private final field field-1: int
|
||||
private final field field-2-0: int
|
||||
private final field field-2-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-2-2: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String): GreaterMfvc
|
||||
public final static method constructor-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String, p3: int, p4: int, p5: int, @org.jetbrains.annotations.NotNull p6: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String, p7: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: java.lang.String): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: int, p6: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): SimpleMfvc
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
public synthetic final method unbox-impl-0-2(): java.lang.String
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public synthetic final method unbox-impl-2(): SimpleMfvc
|
||||
public synthetic final method unbox-impl-2-0(): int
|
||||
public synthetic final method unbox-impl-2-1(): int
|
||||
public synthetic final method unbox-impl-2-2(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class IC {
|
||||
// source: 'classFlattening.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IC
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-pVg5ArA(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class SimpleMfvc$Companion {
|
||||
// source: 'classFlattening.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic final static method access$getPrivate2-sUp7gFk(p0: SimpleMfvc$Companion, p1: int, p2: int, p3: java.lang.String): SimpleMfvc
|
||||
public synthetic final static method access$getPrivate4-sUp7gFk(p0: SimpleMfvc$Companion, p1: int, p2: int, p3: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getA1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final @org.jetbrains.annotations.NotNull method getA2-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getB1$annotations(p0: SimpleMfvc): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getB2$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB2-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate1-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getPrivate2$annotations(p0: SimpleMfvc): void
|
||||
private final method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private final method getPrivate3-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getPrivate4$annotations(): void
|
||||
private final method getPrivate4-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final inner class SimpleMfvc$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class SimpleMfvc {
|
||||
// source: 'classFlattening.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: SimpleMfvc$Companion
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-2: java.lang.String
|
||||
static method <clinit>(): void
|
||||
private synthetic method <init>(p0: int, p1: int, p2: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public final static method constructor-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.String, p3: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): boolean
|
||||
public final static @org.jetbrains.annotations.NotNull method getA3-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String, p3: int, p4: int, @org.jetbrains.annotations.NotNull p5: java.lang.String): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method getB1-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method getB2-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): SimpleMfvc
|
||||
public final static @org.jetbrains.annotations.NotNull method getB3-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String, p3: int, p4: int, @org.jetbrains.annotations.NotNull p5: java.lang.String): SimpleMfvc
|
||||
private final static method getPrivate1-sUp7gFk(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): SimpleMfvc
|
||||
private final static method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
private final static method getPrivate2-sUp7gFk(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): SimpleMfvc
|
||||
private final static method getPrivate4-sUp7gFk(p0: int, p1: int, p2: java.lang.String): SimpleMfvc
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public synthetic final method unbox-impl-2(): java.lang.String
|
||||
public final inner class SimpleMfvc$Companion
|
||||
}
|
||||
@@ -1,304 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: ANDROID, ANDROID_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class A<T : Any>(val x: List<T>)
|
||||
|
||||
@JvmInline
|
||||
value class B(val x: UInt)
|
||||
|
||||
@JvmInline
|
||||
value class C(val x: Int, val y: B, val z: String = "3")
|
||||
|
||||
@JvmInline
|
||||
value class D(val x: C) {
|
||||
constructor(x: Int, y: UInt, z: Int) : this(C(x, B(y), z.toString()))
|
||||
|
||||
init {
|
||||
supply(x.x)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun inlined(x: Int, y: UInt, z: Int): D {
|
||||
return D(C(x, B(y), z.toString()))
|
||||
}
|
||||
|
||||
fun notInlined(x: Int, y: UInt, z: Int) = D(C(x, B(y), z.toString()))
|
||||
|
||||
@JvmInline
|
||||
value class E(val x: D) {
|
||||
var withNonTrivialSetters: D
|
||||
get() = TODO()
|
||||
set(_) = TODO()
|
||||
}
|
||||
|
||||
interface Base3 {
|
||||
val z: E
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class R<T : Any>(val x: Int, val y: UInt, override val z: E, val t: A<T>) : Base1, Base3
|
||||
|
||||
fun <T : List<Int>> f(r: R<T>) {
|
||||
supply(r)
|
||||
supply(r.x)
|
||||
supply(r.y)
|
||||
supply(r.z)
|
||||
supply(r.t)
|
||||
supply(r.t.x)
|
||||
supply(r.z.x)
|
||||
supply(r.z.x.x)
|
||||
supply(r.z.x.x.x)
|
||||
supply(r.z.x.x.y)
|
||||
supply(r.z.x.x.z)
|
||||
supply(r.z.x.x.y.x)
|
||||
}
|
||||
|
||||
fun g(e: E) {
|
||||
supply(e)
|
||||
}
|
||||
|
||||
fun <T : List<Int>> h(r: R<T>) {
|
||||
g(r.z)
|
||||
f(r)
|
||||
r
|
||||
C(2, B(3U), "")
|
||||
D(C(2, B(3U), ""))
|
||||
val x = D(C(2, B(3U), ""))
|
||||
var y = D(C(4, B(5U), "1"))
|
||||
supply(y)
|
||||
y = D(C(6, B(7U), "2"))
|
||||
y = D(6, 7U, 2)
|
||||
y = inlined(6, 7U, 2)
|
||||
y = notInlined(6, 7U, 2)
|
||||
supply(y)
|
||||
}
|
||||
|
||||
fun h1() {
|
||||
var y = inlined(1, 2U, 3) // todo fix box
|
||||
supply(y)
|
||||
y = inlined(4, 5U, 6)
|
||||
supply(y)
|
||||
}
|
||||
|
||||
interface Base1 {
|
||||
val fakeOverrideMFVC: R<List<Int>>
|
||||
get() = TODO()
|
||||
val fakeOverrideRegular: Int
|
||||
get() = TODO()
|
||||
}
|
||||
|
||||
interface Base2 {
|
||||
var l: R<List<Int>>
|
||||
}
|
||||
|
||||
interface Base4<T> {
|
||||
var l: T
|
||||
}
|
||||
|
||||
class NotInlined(override var l: R<List<Int>>, var y: Int) : Base1, Base2, Base4<R<List<Int>>> {
|
||||
override fun toString(): String = l.toString() + l.z.x.x.z
|
||||
|
||||
init {
|
||||
l = l
|
||||
}
|
||||
|
||||
fun trySetter() {
|
||||
l = l
|
||||
}
|
||||
|
||||
var withNonTrivialSetters: R<List<Int>>
|
||||
get() = TODO()
|
||||
set(_) = TODO()
|
||||
|
||||
var withNonTrivialSettersWithBF: R<List<Int>> = l
|
||||
get() {
|
||||
supply("1")
|
||||
field
|
||||
field.t
|
||||
field == field
|
||||
return field
|
||||
}
|
||||
set(value) {
|
||||
supply("3")
|
||||
field = value
|
||||
field = field
|
||||
supply("4")
|
||||
}
|
||||
|
||||
val withNonTrivialGettersWithBF: R<List<Int>> = l
|
||||
get() {
|
||||
supply("1")
|
||||
field
|
||||
field.t
|
||||
field == field
|
||||
return field
|
||||
}
|
||||
}
|
||||
|
||||
fun testVars(x: NotInlined) {
|
||||
x.l.toString()
|
||||
var y = x.l
|
||||
y.toString()
|
||||
y = x.l
|
||||
supply(y)
|
||||
x.l = x.l
|
||||
x.l = R<List<Int>>(x.l.x, x.l.y, x.l.z, x.l.t)
|
||||
}
|
||||
|
||||
fun reuseBoxed(list: MutableList<R<List<Int>>>) {
|
||||
list.add(list.last())
|
||||
}
|
||||
|
||||
val lines = mutableListOf<String>()
|
||||
|
||||
fun supply(x: Any) {
|
||||
lines.add(x.toString())
|
||||
}
|
||||
|
||||
fun equalsChecks1(x: A<List<Int>>) {}
|
||||
fun equalsChecks(left: R<List<Int>>, right: R<List<Int>>) {
|
||||
supply(left == right)
|
||||
supply(left as Any == right)
|
||||
supply(left == right as Any)
|
||||
supply(left as Any == right as Any)
|
||||
supply(null == right)
|
||||
supply(left == null)
|
||||
supply(null as Any? == right)
|
||||
supply(null as R<List<Int>>? == right)
|
||||
supply(left == null as Any?)
|
||||
supply(left == null as R<List<Int>>?)
|
||||
supply(left as R<List<Int>>? == right)
|
||||
supply(left == right as R<List<Int>>?)
|
||||
}
|
||||
|
||||
// todo add default parameters
|
||||
|
||||
fun box(): String {
|
||||
supply("#1")
|
||||
require(inlined(1, 2U, 3) == D(C(1, B(2U), "3")))
|
||||
supply("#2")
|
||||
require(notInlined(1, 2U, 3) == D(C(1, B(2U), "3")))
|
||||
supply("#3")
|
||||
val e = E(D(3, 4U, 5))
|
||||
supply("#4")
|
||||
val r = R(1, 2U, e, A(listOf(listOf(6))))
|
||||
supply("#5")
|
||||
f(r)
|
||||
supply("#6")
|
||||
g(e)
|
||||
supply("#7")
|
||||
h(r)
|
||||
supply("#8")
|
||||
h1()
|
||||
supply("#9")
|
||||
val ni = NotInlined(r, 7)
|
||||
supply("#10")
|
||||
ni.withNonTrivialGettersWithBF
|
||||
supply("#11")
|
||||
ni.withNonTrivialSettersWithBF = ni.withNonTrivialSettersWithBF
|
||||
supply("#12")
|
||||
supply(ni.toString())
|
||||
supply("#13")
|
||||
testVars(ni)
|
||||
supply("#14")
|
||||
reuseBoxed(mutableListOf(r))
|
||||
supply("#15")
|
||||
equalsChecks(r, r)
|
||||
supply("#16")
|
||||
equalsChecks1(A(listOf(listOf())))
|
||||
supply("#17")
|
||||
|
||||
val log = lines.joinToString("\n")
|
||||
val expectedLog =
|
||||
"""
|
||||
#1
|
||||
1
|
||||
1
|
||||
#2
|
||||
1
|
||||
1
|
||||
#3
|
||||
3
|
||||
#4
|
||||
#5
|
||||
R(x=1, y=2, z=E(x=D(x=C(x=3, y=B(x=4), z=5))), t=A(x=[[6]]))
|
||||
1
|
||||
2
|
||||
E(x=D(x=C(x=3, y=B(x=4), z=5)))
|
||||
A(x=[[6]])
|
||||
[[6]]
|
||||
D(x=C(x=3, y=B(x=4), z=5))
|
||||
C(x=3, y=B(x=4), z=5)
|
||||
3
|
||||
B(x=4)
|
||||
5
|
||||
4
|
||||
#6
|
||||
E(x=D(x=C(x=3, y=B(x=4), z=5)))
|
||||
#7
|
||||
E(x=D(x=C(x=3, y=B(x=4), z=5)))
|
||||
R(x=1, y=2, z=E(x=D(x=C(x=3, y=B(x=4), z=5))), t=A(x=[[6]]))
|
||||
1
|
||||
2
|
||||
E(x=D(x=C(x=3, y=B(x=4), z=5)))
|
||||
A(x=[[6]])
|
||||
[[6]]
|
||||
D(x=C(x=3, y=B(x=4), z=5))
|
||||
C(x=3, y=B(x=4), z=5)
|
||||
3
|
||||
B(x=4)
|
||||
5
|
||||
4
|
||||
2
|
||||
2
|
||||
4
|
||||
D(x=C(x=4, y=B(x=5), z=1))
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
D(x=C(x=6, y=B(x=7), z=2))
|
||||
#8
|
||||
1
|
||||
D(x=C(x=1, y=B(x=2), z=3))
|
||||
4
|
||||
D(x=C(x=4, y=B(x=5), z=6))
|
||||
#9
|
||||
#10
|
||||
1
|
||||
#11
|
||||
1
|
||||
3
|
||||
4
|
||||
#12
|
||||
R(x=1, y=2, z=E(x=D(x=C(x=3, y=B(x=4), z=5))), t=A(x=[[6]]))5
|
||||
#13
|
||||
R(x=1, y=2, z=E(x=D(x=C(x=3, y=B(x=4), z=5))), t=A(x=[[6]]))
|
||||
#14
|
||||
#15
|
||||
true
|
||||
true
|
||||
true
|
||||
true
|
||||
false
|
||||
false
|
||||
false
|
||||
false
|
||||
false
|
||||
false
|
||||
true
|
||||
true
|
||||
#16
|
||||
#17
|
||||
""".trimIndent()
|
||||
require(log == expectedLog) { log }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,317 +0,0 @@
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
// source: 'complex.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field x: java.util.List
|
||||
private synthetic method <init>(p0: java.util.List): void
|
||||
public synthetic final static method box-impl(p0: java.util.List): A
|
||||
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.util.List): java.util.List
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.List, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.List, p1: java.util.List): boolean
|
||||
public final @org.jetbrains.annotations.NotNull method getX(): java.util.List
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.List): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.util.List): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.util.List
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'complex.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): B
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-pVg5ArA(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Base1$DefaultImpls {
|
||||
// source: 'complex.kt'
|
||||
public static @org.jetbrains.annotations.NotNull method getFakeOverrideMFVC(@org.jetbrains.annotations.NotNull p0: Base1): R
|
||||
public synthetic static method getFakeOverrideMFVC-0(p0: Base1): int
|
||||
public synthetic static method getFakeOverrideMFVC-1(p0: Base1): int
|
||||
public synthetic static method getFakeOverrideMFVC-2(p0: Base1): E
|
||||
public synthetic static method getFakeOverrideMFVC-2-0(p0: Base1): D
|
||||
public synthetic static method getFakeOverrideMFVC-2-0-0(p0: Base1): C
|
||||
public synthetic static method getFakeOverrideMFVC-2-0-0-0(p0: Base1): int
|
||||
public synthetic static method getFakeOverrideMFVC-2-0-0-1(p0: Base1): int
|
||||
public synthetic static method getFakeOverrideMFVC-2-0-0-2(p0: Base1): java.lang.String
|
||||
public synthetic static method getFakeOverrideMFVC-3(p0: Base1): java.util.List
|
||||
public static method getFakeOverrideRegular(@org.jetbrains.annotations.NotNull p0: Base1): int
|
||||
public final inner class Base1$DefaultImpls
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface Base1 {
|
||||
// source: 'complex.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method getFakeOverrideMFVC(): R
|
||||
public synthetic abstract method getFakeOverrideMFVC-0(): int
|
||||
public synthetic abstract method getFakeOverrideMFVC-1(): int
|
||||
public synthetic abstract method getFakeOverrideMFVC-2(): E
|
||||
public synthetic abstract method getFakeOverrideMFVC-2-0(): D
|
||||
public synthetic abstract method getFakeOverrideMFVC-2-0-0(): C
|
||||
public synthetic abstract method getFakeOverrideMFVC-2-0-0-0(): int
|
||||
public synthetic abstract method getFakeOverrideMFVC-2-0-0-1(): int
|
||||
public synthetic abstract method getFakeOverrideMFVC-2-0-0-2(): java.lang.String
|
||||
public synthetic abstract method getFakeOverrideMFVC-3(): java.util.List
|
||||
public abstract method getFakeOverrideRegular(): int
|
||||
public final inner class Base1$DefaultImpls
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface Base2 {
|
||||
// source: 'complex.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method getL(): R
|
||||
public synthetic abstract method getL-0(): int
|
||||
public synthetic abstract method getL-1(): int
|
||||
public synthetic abstract method getL-2(): E
|
||||
public synthetic abstract method getL-2-0(): D
|
||||
public synthetic abstract method getL-2-0-0(): C
|
||||
public synthetic abstract method getL-2-0-0-0(): int
|
||||
public synthetic abstract method getL-2-0-0-1(): int
|
||||
public synthetic abstract method getL-2-0-0-2(): java.lang.String
|
||||
public synthetic abstract method getL-3(): java.util.List
|
||||
public abstract method setL-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface Base3 {
|
||||
// source: 'complex.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method getZ(): E
|
||||
public synthetic abstract method getZ-0(): D
|
||||
public synthetic abstract method getZ-0-0(): C
|
||||
public synthetic abstract method getZ-0-0-0(): int
|
||||
public synthetic abstract method getZ-0-0-1(): int
|
||||
public synthetic abstract method getZ-0-0-2(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface Base4 {
|
||||
// source: 'complex.kt'
|
||||
public abstract method getL(): java.lang.Object
|
||||
public abstract method setL(p0: java.lang.Object): void
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class C {
|
||||
// source: 'complex.kt'
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-2: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: java.lang.String): C
|
||||
public final static method constructor-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.String, p3: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public synthetic final method unbox-impl-2(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class ComplexKt {
|
||||
// source: 'complex.kt'
|
||||
private final static @org.jetbrains.annotations.NotNull field lines: java.util.List
|
||||
static method <clinit>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static method equalsChecks-GPBa7dw(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List, p6: int, p7: int, p8: int, p9: int, @org.jetbrains.annotations.NotNull p10: java.lang.String, @org.jetbrains.annotations.NotNull p11: java.util.List): void
|
||||
public final static method equalsChecks1-iUtXLc0(@org.jetbrains.annotations.NotNull p0: java.util.List): void
|
||||
public final static method f-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public final static method g-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
|
||||
public final static @org.jetbrains.annotations.NotNull method getLines(): java.util.List
|
||||
public final static method h-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public final static method h1(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method inlined-OsBMiQA(p0: int, p1: int, p2: int): D
|
||||
public final static @org.jetbrains.annotations.NotNull method notInlined-OsBMiQA(p0: int, p1: int, p2: int): D
|
||||
public final static method reuseBoxed(@org.jetbrains.annotations.NotNull p0: java.util.List): void
|
||||
public final static method supply(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void
|
||||
public final static method testVars(@org.jetbrains.annotations.NotNull p0: NotInlined): void
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class D {
|
||||
// source: 'complex.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-0-2: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: java.lang.String): D
|
||||
public final static method constructor-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
|
||||
public final static @org.jetbrains.annotations.NotNull method constructor-impl(p0: int, p1: int, p2: int): D
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.String, p3: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): C
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
public synthetic final method unbox-impl-0-2(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class E {
|
||||
// source: 'complex.kt'
|
||||
private final field field-0-0-0: int
|
||||
private final field field-0-0-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-0-0-2: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: java.lang.String): E
|
||||
public final static method constructor-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.String, p3: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: java.lang.String, p3: int, p4: int, p5: java.lang.String): boolean
|
||||
public final static @org.jetbrains.annotations.NotNull method getWithNonTrivialSetters-impl(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String): D
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: java.lang.String): int
|
||||
public final static method setWithNonTrivialSetters-sUp7gFk(p0: int, p1: int, @org.jetbrains.annotations.NotNull p2: java.lang.String, p3: int, p4: int, @org.jetbrains.annotations.NotNull p5: java.lang.String): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): D
|
||||
public synthetic final method unbox-impl-0-0(): C
|
||||
public synthetic final method unbox-impl-0-0-0(): int
|
||||
public synthetic final method unbox-impl-0-0-1(): int
|
||||
public synthetic final method unbox-impl-0-0-2(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class NotInlined {
|
||||
// source: 'complex.kt'
|
||||
private field l-0: int
|
||||
private field l-1: int
|
||||
private field l-2-0-0-0: int
|
||||
private field l-2-0-0-1: int
|
||||
private @org.jetbrains.annotations.NotNull field l-2-0-0-2: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field l-3: java.util.List
|
||||
private final field withNonTrivialGettersWithBF-0: int
|
||||
private final field withNonTrivialGettersWithBF-1: int
|
||||
private final field withNonTrivialGettersWithBF-2-0-0-0: int
|
||||
private final field withNonTrivialGettersWithBF-2-0-0-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field withNonTrivialGettersWithBF-2-0-0-2: java.lang.String
|
||||
private final @org.jetbrains.annotations.NotNull field withNonTrivialGettersWithBF-3: java.util.List
|
||||
private field withNonTrivialSettersWithBF-0: int
|
||||
private field withNonTrivialSettersWithBF-1: int
|
||||
private field withNonTrivialSettersWithBF-2-0-0-0: int
|
||||
private field withNonTrivialSettersWithBF-2-0-0-1: int
|
||||
private @org.jetbrains.annotations.NotNull field withNonTrivialSettersWithBF-2-0-0-2: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field withNonTrivialSettersWithBF-3: java.util.List
|
||||
private field y: int
|
||||
private method <init>(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List, p6: int): void
|
||||
public synthetic method <init>(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List, p6: int, p7: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public @org.jetbrains.annotations.NotNull method getFakeOverrideMFVC(): R
|
||||
public method getFakeOverrideRegular(): int
|
||||
public @org.jetbrains.annotations.NotNull method getL(): R
|
||||
public synthetic bridge method getL(): java.lang.Object
|
||||
public synthetic method getL-0(): int
|
||||
public synthetic method getL-1(): int
|
||||
public synthetic method getL-2(): E
|
||||
public synthetic method getL-2-0(): D
|
||||
public synthetic method getL-2-0-0(): C
|
||||
public synthetic method getL-2-0-0-0(): int
|
||||
public synthetic method getL-2-0-0-1(): int
|
||||
public synthetic method getL-2-0-0-2(): java.lang.String
|
||||
public synthetic method getL-3(): java.util.List
|
||||
public final @org.jetbrains.annotations.NotNull method getWithNonTrivialGettersWithBF(): R
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-0(): int
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-1(): int
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2(): E
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2-0(): D
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2-0-0(): C
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2-0-0-0(): int
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2-0-0-1(): int
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-2-0-0-2(): java.lang.String
|
||||
public synthetic final method getWithNonTrivialGettersWithBF-3(): java.util.List
|
||||
public final @org.jetbrains.annotations.NotNull method getWithNonTrivialSetters(): R
|
||||
public synthetic final method getWithNonTrivialSetters-0(): int
|
||||
public synthetic final method getWithNonTrivialSetters-1(): int
|
||||
public synthetic final method getWithNonTrivialSetters-2(): E
|
||||
public synthetic final method getWithNonTrivialSetters-2-0(): D
|
||||
public synthetic final method getWithNonTrivialSetters-2-0-0(): C
|
||||
public synthetic final method getWithNonTrivialSetters-2-0-0-0(): int
|
||||
public synthetic final method getWithNonTrivialSetters-2-0-0-1(): int
|
||||
public synthetic final method getWithNonTrivialSetters-2-0-0-2(): java.lang.String
|
||||
public synthetic final method getWithNonTrivialSetters-3(): java.util.List
|
||||
public final @org.jetbrains.annotations.NotNull method getWithNonTrivialSettersWithBF(): R
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-0(): int
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-1(): int
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2(): E
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2-0(): D
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2-0-0(): C
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2-0-0-0(): int
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2-0-0-1(): int
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-2-0-0-2(): java.lang.String
|
||||
public synthetic final method getWithNonTrivialSettersWithBF-3(): java.util.List
|
||||
public final method getY(): int
|
||||
public synthetic bridge method setL(p0: java.lang.Object): void
|
||||
public method setL-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public final method setWithNonTrivialSetters-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public final method setWithNonTrivialSettersWithBF-sUp7gFk(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public final method setY(p0: int): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public final method trySetter(): void
|
||||
public final inner class Base1$DefaultImpls
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class R {
|
||||
// source: 'complex.kt'
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private final field field-2-0-0-0: int
|
||||
private final field field-2-0-0-1: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-2-0-0-2: java.lang.String
|
||||
private final @org.jetbrains.annotations.NotNull field field-3: java.util.List
|
||||
private synthetic method <init>(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List): R
|
||||
public final static method constructor-impl(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List, p6: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List, p6: int, p7: int, p8: int, p9: int, p10: java.lang.String, p11: java.util.List): boolean
|
||||
public @org.jetbrains.annotations.NotNull method getFakeOverrideMFVC(): R
|
||||
public static @org.jetbrains.annotations.NotNull method getFakeOverrideMFVC-impl(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): R
|
||||
public method getFakeOverrideRegular(): int
|
||||
public static method getFakeOverrideRegular-impl(p0: int, p1: int, p2: int, p3: int, @org.jetbrains.annotations.NotNull p4: java.lang.String, @org.jetbrains.annotations.NotNull p5: java.util.List): int
|
||||
public @org.jetbrains.annotations.NotNull method getZ(): E
|
||||
public synthetic bridge method getZ-0(): D
|
||||
public synthetic bridge method getZ-0-0(): C
|
||||
public synthetic bridge method getZ-0-0-0(): int
|
||||
public synthetic bridge method getZ-0-0-1(): int
|
||||
public synthetic bridge method getZ-0-0-2(): java.lang.String
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: int, p3: int, p4: java.lang.String, p5: java.util.List): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public synthetic final method unbox-impl-2(): E
|
||||
public synthetic final method unbox-impl-2-0(): D
|
||||
public synthetic final method unbox-impl-2-0-0(): C
|
||||
public synthetic final method unbox-impl-2-0-0-0(): int
|
||||
public synthetic final method unbox-impl-2-0-0-1(): int
|
||||
public synthetic final method unbox-impl-2-0-0-2(): java.lang.String
|
||||
public synthetic final method unbox-impl-3(): java.util.List
|
||||
public final inner class Base1$DefaultImpls
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
// 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) {
|
||||
init {
|
||||
counter++
|
||||
}
|
||||
companion object {
|
||||
@JvmStatic
|
||||
var counter: Int = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun ifExpr() = if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
|
||||
fun whenExpr() = when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
|
||||
fun ifBody() {
|
||||
if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
val x = if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
require(x == DPoint(4.0, 5.0))
|
||||
}
|
||||
|
||||
fun whenBody() {
|
||||
when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
val x = when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
require(x == DPoint(8.0, 9.0))
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
ifBody()
|
||||
whenBody()
|
||||
require(ifExpr() == DPoint(4.0, 5.0))
|
||||
require(whenExpr() == DPoint(8.0, 9.0))
|
||||
require(DPoint.counter == 5 + 5 + 2 + 1 + 2 + 1)
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
public final class ConditionalExpressionsKt {
|
||||
// source: 'conditionalExpressions.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static method ifBody(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method ifExpr(): DPoint
|
||||
public final static method whenBody(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method whenExpr(): DPoint
|
||||
public final inner class DPoint$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class DPoint$Companion {
|
||||
// source: 'conditionalExpressions.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getCounter$annotations(): void
|
||||
public final method getCounter(): int
|
||||
public final method setCounter(p0: int): void
|
||||
public final inner class DPoint$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class DPoint {
|
||||
// source: 'conditionalExpressions.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: DPoint$Companion
|
||||
private static field counter: int
|
||||
private final field field-0: double
|
||||
private final field field-1: double
|
||||
static method <clinit>(): void
|
||||
private synthetic method <init>(p0: double, p1: double): void
|
||||
public synthetic final static method access$getCounter$cp(): int
|
||||
public synthetic final static method access$setCounter$cp(p0: int): void
|
||||
public synthetic final static method box-impl(p0: double, p1: double): DPoint
|
||||
public final static method constructor-impl(p0: double, p1: double): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: double, p1: double, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: double, p1: double, p2: double, p3: double): boolean
|
||||
public final static method getCounter(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: double, p1: double): int
|
||||
public final static method setCounter(p0: int): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: double, p1: double): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): double
|
||||
public synthetic final method unbox-impl-1(): double
|
||||
public final inner class DPoint$Companion
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class F1(val x: Int)
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
// source: 'equality.kt'
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private final field field-2-0: int
|
||||
private final field field-2-1: int
|
||||
private final field field-3: int
|
||||
private final field field-4: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-5: java.lang.String
|
||||
private final field field-6: int
|
||||
private final field field-7: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-8: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String): A
|
||||
public final static method constructor-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, @org.jetbrains.annotations.NotNull p6: java.lang.String, p7: int, p8: int, @org.jetbrains.annotations.NotNull p9: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public synthetic final method unbox-impl-2(): F3
|
||||
public synthetic final method unbox-impl-2-0(): int
|
||||
public synthetic final method unbox-impl-2-1(): int
|
||||
public synthetic final method unbox-impl-3(): int
|
||||
public synthetic final method unbox-impl-4(): int
|
||||
public synthetic final method unbox-impl-5(): java.lang.String
|
||||
public synthetic final method unbox-impl-6(): int
|
||||
public synthetic final method unbox-impl-7(): int
|
||||
public synthetic final method unbox-impl-8(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'equality.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private final field field-0-2-0: int
|
||||
private final field field-0-2-1: int
|
||||
private final field field-0-3: int
|
||||
private final field field-0-4: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-0-5: java.lang.String
|
||||
private final field field-0-6: int
|
||||
private final field field-0-7: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-0-8: java.lang.String
|
||||
private final field field-1-0: int
|
||||
private final field field-1-1: int
|
||||
private final field field-1-2-0: int
|
||||
private final field field-1-2-1: int
|
||||
private final field field-1-3: int
|
||||
private final field field-1-4: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-1-5: java.lang.String
|
||||
private final field field-1-6: int
|
||||
private final field field-1-7: int
|
||||
private final @org.jetbrains.annotations.NotNull field field-1-8: java.lang.String
|
||||
private synthetic method <init>(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String): B
|
||||
public final static method constructor-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, @org.jetbrains.annotations.NotNull p6: java.lang.String, p7: int, p8: int, @org.jetbrains.annotations.NotNull p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, @org.jetbrains.annotations.NotNull p16: java.lang.String, p17: int, p18: int, @org.jetbrains.annotations.NotNull p19: java.lang.String): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String, p20: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String, p20: int, p21: int, p22: int, p23: int, p24: int, p25: int, p26: java.lang.String, p27: int, p28: int, p29: java.lang.String, p30: int, p31: int, p32: int, p33: int, p34: int, p35: int, p36: java.lang.String, p37: int, p38: int, p39: java.lang.String): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: java.lang.String, p7: int, p8: int, p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, p16: java.lang.String, p17: int, p18: int, p19: java.lang.String): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, @org.jetbrains.annotations.NotNull p6: java.lang.String, p7: int, p8: int, @org.jetbrains.annotations.NotNull p9: java.lang.String, p10: int, p11: int, p12: int, p13: int, p14: int, p15: int, @org.jetbrains.annotations.NotNull p16: java.lang.String, p17: int, p18: int, @org.jetbrains.annotations.NotNull p19: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): A
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
public synthetic final method unbox-impl-0-2(): F3
|
||||
public synthetic final method unbox-impl-0-2-0(): int
|
||||
public synthetic final method unbox-impl-0-2-1(): int
|
||||
public synthetic final method unbox-impl-0-3(): int
|
||||
public synthetic final method unbox-impl-0-4(): int
|
||||
public synthetic final method unbox-impl-0-5(): java.lang.String
|
||||
public synthetic final method unbox-impl-0-6(): int
|
||||
public synthetic final method unbox-impl-0-7(): int
|
||||
public synthetic final method unbox-impl-0-8(): java.lang.String
|
||||
public synthetic final method unbox-impl-1(): A
|
||||
public synthetic final method unbox-impl-1-0(): int
|
||||
public synthetic final method unbox-impl-1-1(): int
|
||||
public synthetic final method unbox-impl-1-2(): F3
|
||||
public synthetic final method unbox-impl-1-2-0(): int
|
||||
public synthetic final method unbox-impl-1-2-1(): int
|
||||
public synthetic final method unbox-impl-1-3(): int
|
||||
public synthetic final method unbox-impl-1-4(): int
|
||||
public synthetic final method unbox-impl-1-5(): java.lang.String
|
||||
public synthetic final method unbox-impl-1-6(): int
|
||||
public synthetic final method unbox-impl-1-7(): int
|
||||
public synthetic final method unbox-impl-1-8(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class EqualityKt {
|
||||
// source: 'equality.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F1 {
|
||||
// source: 'equality.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): F1
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F2 {
|
||||
// source: 'equality.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): F2
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-pVg5ArA(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F3 {
|
||||
// source: 'equality.kt'
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): F3
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F4 {
|
||||
// source: 'equality.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): F4
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F5 {
|
||||
// source: 'equality.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): F5
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-pVg5ArA(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class F6 {
|
||||
// source: 'equality.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
|
||||
private synthetic method <init>(p0: java.lang.String): void
|
||||
public synthetic final static method box-impl(p0: java.lang.String): F6
|
||||
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
|
||||
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.lang.String): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.lang.String): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.lang.String
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// 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"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
// source: 'mfvcFieldInitializationOrder.kt'
|
||||
private field x-0: double
|
||||
private field x-1: double
|
||||
public method <init>(p0: double, p1: double): void
|
||||
public final @org.jetbrains.annotations.NotNull method getX(): DPoint
|
||||
public synthetic final method getX-0(): double
|
||||
public synthetic final method getX-1(): double
|
||||
public final method setX-sUp7gFk(p0: double, p1: double): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'mfvcFieldInitializationOrder.kt'
|
||||
private field a-0: double
|
||||
private field a-1: double
|
||||
private final field b-0: double
|
||||
private final field b-1: double
|
||||
private final field c-0: double
|
||||
private final field c-1: double
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getA(): DPoint
|
||||
public synthetic final method getA-0(): double
|
||||
public synthetic final method getA-1(): double
|
||||
public final @org.jetbrains.annotations.NotNull method getB(): DPoint
|
||||
public synthetic final method getB-0(): double
|
||||
public synthetic final method getB-1(): double
|
||||
public final @org.jetbrains.annotations.NotNull method getC(): DPoint
|
||||
public synthetic final method getC-0(): double
|
||||
public synthetic final method getC-1(): double
|
||||
public final method setA-sUp7gFk(p0: double, p1: double): void
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class DPoint {
|
||||
// source: 'mfvcFieldInitializationOrder.kt'
|
||||
private final field field-0: double
|
||||
private final field field-1: double
|
||||
private synthetic method <init>(p0: double, p1: double): void
|
||||
public synthetic final static method box-impl(p0: double, p1: double): DPoint
|
||||
public final static method constructor-impl(p0: double, p1: double): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: double, p1: double, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: double, p1: double, p2: double, p3: double): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: double, p1: double): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: double, p1: double): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): double
|
||||
public synthetic final method unbox-impl-1(): double
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MfvcFieldInitializationOrderKt {
|
||||
// source: 'mfvcFieldInitializationOrder.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
@@ -1,311 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
interface AbstractPoint<T> {
|
||||
val x: T
|
||||
val y: T
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class DPoint(override val x: Double, override val y: Double): AbstractPoint<Double>
|
||||
|
||||
interface GenericMFVCHolder<T> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBound<T : DPoint> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolder {
|
||||
var p: DPoint
|
||||
var p1: DPoint
|
||||
}
|
||||
|
||||
data class DataClassException(val value: Any?): Exception()
|
||||
|
||||
interface GenericMFVCHolderWithImpls<T> {
|
||||
var p: T
|
||||
get() = throw DataClassException(1)
|
||||
set(value) = throw DataClassException(2 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(3)
|
||||
set(value) = throw DataClassException(4 to value)
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBoundWithImpls<T : DPoint> {
|
||||
var p: T
|
||||
get() = throw DataClassException(5)
|
||||
set(value) = throw DataClassException(6 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(7)
|
||||
set(value) = throw DataClassException(8 to value)
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolderWithImpls {
|
||||
var p: DPoint
|
||||
get() = throw DataClassException(9)
|
||||
set(value) = throw DataClassException(10 to value)
|
||||
|
||||
var p1: DPoint
|
||||
get() = throw DataClassException(11)
|
||||
set(value) = throw DataClassException(12 to value)
|
||||
}
|
||||
|
||||
class RealOverride(override var p: DPoint) : GenericMFVCHolder<DPoint>, ReifiedMFVCHolder, GenericMFVCHolderWithMFVCUpperBound<DPoint> {
|
||||
override var p1: DPoint
|
||||
get() = throw DataClassException(13)
|
||||
set(value) = throw DataClassException(14 to value)
|
||||
}
|
||||
|
||||
class GenericFakeOverride : GenericMFVCHolderWithImpls<DPoint>
|
||||
class ReifiedFakeOverride : ReifiedMFVCHolderWithImpls
|
||||
class GenericFakeOverrideWithMFVCUpperBound : GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>
|
||||
|
||||
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVC(val field1: Double, val field2: Double) : GenericMFVCHolderWithImpls<DPoint>
|
||||
@JvmInline
|
||||
value class ReifiedFakeOverrideMFVC(val field1: Double, val field2: Double) : ReifiedMFVCHolderWithImpls
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVCWithMFVCUpperBound(val field1: Double, val field2: Double) : GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>
|
||||
|
||||
|
||||
interface SomePointInterface<T> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: DPoint
|
||||
}
|
||||
|
||||
interface SomePointInterfaceWithMFVCBound<T : DPoint> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: DPoint
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class DPointWithInterface(val x: Double, val y: Double) : SomePointInterface<DPoint>, SomePointInterfaceWithMFVCBound<DPoint> {
|
||||
override var somethingGeneric: DPoint
|
||||
get() = throw DataClassException(15)
|
||||
set(value) = throw DataClassException(16 to value)
|
||||
|
||||
override var somethingMFVC: DPoint
|
||||
get() = throw DataClassException(17)
|
||||
set(value) = throw DataClassException(18 to value)
|
||||
|
||||
override var somethingRegular: Int
|
||||
get() = throw DataClassException(19)
|
||||
set(value) = throw DataClassException(20 to value)
|
||||
}
|
||||
|
||||
|
||||
interface AbstractSegment<T> {
|
||||
val p1: T
|
||||
val p2: T
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class DSegment(override val p1: DPoint, override val p2: DPoint): AbstractSegment<DPoint>
|
||||
|
||||
fun <T> equal(expected: () -> T, actual: () -> T) {
|
||||
val expectedResult = runCatching { expected() }
|
||||
val actualResult = runCatching { actual() }
|
||||
require(expectedResult == actualResult) { "Expected: $expectedResult\nActual: $actualResult" }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val dPoint = DPoint(1.0, 2.0)
|
||||
|
||||
val lam1: () -> DPoint = { throw DataClassException(1) }
|
||||
val lam2: () -> Unit = { throw DataClassException(2 to dPoint) }
|
||||
val lam3: () -> DPoint = { throw DataClassException(3) }
|
||||
val lam4: () -> Unit = { throw DataClassException(4 to dPoint) }
|
||||
val lam5: () -> DPoint = { throw DataClassException(5) }
|
||||
val lam6: () -> Unit = { throw DataClassException(6 to dPoint) }
|
||||
val lam7: () -> DPoint = { throw DataClassException(7) }
|
||||
val lam8: () -> Unit = { throw DataClassException(8 to dPoint) }
|
||||
val lam9: () -> DPoint = { throw DataClassException(9) }
|
||||
val lam10: () -> Unit = { throw DataClassException(10 to dPoint) }
|
||||
val lam11: () -> DPoint = { throw DataClassException(11) }
|
||||
val lam12: () -> Unit = { throw DataClassException(12 to dPoint) }
|
||||
val lam13: () -> DPoint = { throw DataClassException(13) }
|
||||
val lam14: () -> Unit = { throw DataClassException(14 to dPoint) }
|
||||
val lam15: () -> DPoint = { throw DataClassException(15) }
|
||||
val lam16: () -> Unit = { throw DataClassException(16 to dPoint) }
|
||||
val lam17: () -> DPoint = { throw DataClassException(17) }
|
||||
val lam18: () -> Unit = { throw DataClassException(18 to dPoint) }
|
||||
val lam19: () -> Int = { throw DataClassException(19) }
|
||||
val lam20: () -> Unit = { throw DataClassException(20 to 1) }
|
||||
val emptyLam = {}
|
||||
val dPointLam = { dPoint }
|
||||
val otherDPoint = DPoint(3.0, 4.0)
|
||||
val otherDPointLam = { otherDPoint }
|
||||
equal({ "DPoint(x=1.0, y=2.0)" }, { dPoint.toString() })
|
||||
equal({ "DPoint(x=1.0, y=2.0)" }, { (dPoint as Any).toString() })
|
||||
|
||||
equal({ true }, { dPoint.equals(dPoint) })
|
||||
equal({ true }, { dPoint.equals(dPoint as Any) })
|
||||
equal({ true }, { (dPoint as Any).equals(dPoint) })
|
||||
equal({ true }, { (dPoint as Any).equals(dPoint as Any) })
|
||||
|
||||
equal({ false }, { dPoint.equals(otherDPoint) })
|
||||
equal({ false }, { dPoint.equals(otherDPoint as Any) })
|
||||
equal({ false }, { (dPoint as Any).equals(otherDPoint) })
|
||||
equal({ false }, { (dPoint as Any).equals(otherDPoint as Any) })
|
||||
|
||||
equal({ dPoint.hashCode() }, { (dPoint as Any).hashCode() })
|
||||
|
||||
equal({ 1.0 }, { dPoint.x })
|
||||
equal({ 1.0 }, { (dPoint as AbstractPoint<Double>).x })
|
||||
equal({ 2.0 }, { dPoint.y })
|
||||
equal({ 2.0 }, { (dPoint as AbstractPoint<Double>).y })
|
||||
|
||||
|
||||
val realOverride = RealOverride(dPoint)
|
||||
|
||||
equal(dPointLam, { realOverride.p })
|
||||
equal(dPointLam, { (realOverride as GenericMFVCHolder<DPoint>).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolder<DPoint>).p1 })
|
||||
equal(dPointLam, { (realOverride as ReifiedMFVCHolder).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as ReifiedMFVCHolder).p1 })
|
||||
equal(dPointLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p1 })
|
||||
|
||||
|
||||
equal(emptyLam, { realOverride.p = dPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolder<DPoint>).p = dPoint })
|
||||
equal(lam14, { realOverride.p1 = dPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolder<DPoint>).p1 = dPoint })
|
||||
equal(emptyLam, { (realOverride as ReifiedMFVCHolder).p = dPoint })
|
||||
equal(lam14, { (realOverride as ReifiedMFVCHolder).p1 = dPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p = dPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val genericFakeOverride = GenericFakeOverride()
|
||||
|
||||
equal(lam1, { genericFakeOverride.p })
|
||||
equal(lam1, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p })
|
||||
equal(lam3, { genericFakeOverride.p1 })
|
||||
equal(lam3, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p1 })
|
||||
val reifiedFakeOverride = ReifiedFakeOverride()
|
||||
equal(lam9, { reifiedFakeOverride.p })
|
||||
equal(lam9, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p })
|
||||
equal(lam11, { reifiedFakeOverride.p1 })
|
||||
equal(lam11, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p1 })
|
||||
val genericFakeOverrideWithMFVCUpperBound = GenericFakeOverrideWithMFVCUpperBound()
|
||||
equal(lam5, { genericFakeOverrideWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p })
|
||||
equal(lam7, { genericFakeOverrideWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverride.p = dPoint })
|
||||
equal(lam2, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam4, { genericFakeOverride.p1 = dPoint })
|
||||
equal(lam4, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p1 = dPoint })
|
||||
equal(lam10, { reifiedFakeOverride.p = dPoint })
|
||||
equal(lam10, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p = dPoint })
|
||||
equal(lam12, { reifiedFakeOverride.p1 = dPoint })
|
||||
equal(lam12, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p1 = dPoint })
|
||||
equal(lam6, { genericFakeOverrideWithMFVCUpperBound.p = dPoint })
|
||||
equal(lam6, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam8, { genericFakeOverrideWithMFVCUpperBound.p1 = dPoint })
|
||||
equal(lam8, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val genericFakeOverrideMFVC = GenericFakeOverrideMFVC(1.0, 2.0)
|
||||
|
||||
equal(lam1, { genericFakeOverrideMFVC.p })
|
||||
equal(lam1, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p })
|
||||
equal(lam3, { genericFakeOverrideMFVC.p1 })
|
||||
equal(lam3, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p1 })
|
||||
|
||||
val reifiedFakeOverrideMFVC = ReifiedFakeOverrideMFVC(1.0, 2.0)
|
||||
equal(lam9, { reifiedFakeOverrideMFVC.p })
|
||||
equal(lam9, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p })
|
||||
equal(lam11, { reifiedFakeOverrideMFVC.p1 })
|
||||
equal(lam11, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p1 })
|
||||
|
||||
val genericFakeOverrideMFVCWithMFVCUpperBound = GenericFakeOverrideMFVCWithMFVCUpperBound(1.0, 2.0)
|
||||
equal(lam5, { genericFakeOverrideMFVCWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p })
|
||||
equal(lam7, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverrideMFVC.p = dPoint })
|
||||
equal(lam2, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam4, { genericFakeOverrideMFVC.p1 = dPoint })
|
||||
equal(lam4, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
equal(lam10, { reifiedFakeOverrideMFVC.p = dPoint })
|
||||
equal(lam10, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p = dPoint })
|
||||
equal(lam12, { reifiedFakeOverrideMFVC.p1 = dPoint })
|
||||
equal(lam12, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p1 = dPoint })
|
||||
|
||||
equal(lam6, { genericFakeOverrideMFVCWithMFVCUpperBound.p = dPoint })
|
||||
equal(lam6, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam8, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 = dPoint })
|
||||
equal(lam8, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val dPointWithInterface = DPointWithInterface(1.0, 2.0)
|
||||
|
||||
equal(lam15, { dPointWithInterface.somethingGeneric })
|
||||
equal(lam15, { (dPointWithInterface as SomePointInterface<DPoint>).somethingGeneric })
|
||||
equal(lam19, { dPointWithInterface.somethingRegular })
|
||||
equal(lam19, { (dPointWithInterface as SomePointInterface<DPoint>).somethingRegular })
|
||||
equal(lam17, { dPointWithInterface.somethingMFVC })
|
||||
equal(lam17, { (dPointWithInterface as SomePointInterface<DPoint>).somethingMFVC })
|
||||
|
||||
equal(lam15, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingGeneric })
|
||||
equal(lam19, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingRegular })
|
||||
equal(lam17, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingMFVC })
|
||||
|
||||
equal(lam16, { dPointWithInterface.somethingGeneric = dPoint })
|
||||
equal(lam16, { (dPointWithInterface as SomePointInterface<DPoint>).somethingGeneric = dPoint })
|
||||
equal(lam20, { dPointWithInterface.somethingRegular = 1 })
|
||||
equal(lam20, { (dPointWithInterface as SomePointInterface<DPoint>).somethingRegular = 1 })
|
||||
equal(lam18, { dPointWithInterface.somethingMFVC = dPoint })
|
||||
equal(lam18, { (dPointWithInterface as SomePointInterface<DPoint>).somethingMFVC = dPoint })
|
||||
|
||||
equal(lam16, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingGeneric = dPoint })
|
||||
equal(lam20, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingRegular = 1 })
|
||||
equal(lam18, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingMFVC = dPoint })
|
||||
|
||||
|
||||
val dSegment = DSegment(dPoint, otherDPoint)
|
||||
|
||||
equal(dPointLam, { dSegment.p1 })
|
||||
equal(otherDPointLam, { dSegment.p2 })
|
||||
equal({ 1.0 }, { dPoint.x })
|
||||
equal({ 1.0 }, { dSegment.p1.x })
|
||||
equal({ 3.0 }, { otherDPoint.x })
|
||||
equal({ 3.0 }, { dSegment.p2.x })
|
||||
equal({ 2.0 }, { dPoint.y })
|
||||
equal({ 2.0 }, { dSegment.p1.y })
|
||||
equal({ 4.0 }, { otherDPoint.y })
|
||||
equal({ 4.0 }, { dSegment.p2.y })
|
||||
equal(dPointLam, { (dSegment as AbstractSegment<DPoint>).p1 })
|
||||
equal(otherDPointLam, { (dSegment as AbstractSegment<DPoint>).p2 })
|
||||
equal({ 1.0 }, { (dSegment as AbstractSegment<DPoint>).p1.x })
|
||||
equal({ 3.0 }, { (dSegment as AbstractSegment<DPoint>).p2.x })
|
||||
equal({ 2.0 }, { (dSegment as AbstractSegment<DPoint>).p1.y })
|
||||
equal({ 4.0 }, { (dSegment as AbstractSegment<DPoint>).p2.y })
|
||||
|
||||
return "OK"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,317 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
interface AbstractPoint<T> {
|
||||
val x: T
|
||||
val y: T
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class MyDouble(val value: Double)
|
||||
|
||||
val Double.my
|
||||
get() = MyDouble(this)
|
||||
|
||||
@JvmInline
|
||||
value class DPoint(override val x: MyDouble, override val y: MyDouble): AbstractPoint<MyDouble>
|
||||
|
||||
interface GenericMFVCHolder<T> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBound<T : DPoint> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolder {
|
||||
var p: DPoint
|
||||
var p1: DPoint
|
||||
}
|
||||
|
||||
data class DataClassException(val value: Any?): Exception()
|
||||
|
||||
interface GenericMFVCHolderWithImpls<T> {
|
||||
var p: T
|
||||
get() = throw DataClassException(1)
|
||||
set(value) = throw DataClassException(2 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(3)
|
||||
set(value) = throw DataClassException(4 to value)
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBoundWithImpls<T : DPoint> {
|
||||
var p: T
|
||||
get() = throw DataClassException(5)
|
||||
set(value) = throw DataClassException(6 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(7)
|
||||
set(value) = throw DataClassException(8 to value)
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolderWithImpls {
|
||||
var p: DPoint
|
||||
get() = throw DataClassException(9)
|
||||
set(value) = throw DataClassException(10 to value)
|
||||
|
||||
var p1: DPoint
|
||||
get() = throw DataClassException(11)
|
||||
set(value) = throw DataClassException(12 to value)
|
||||
}
|
||||
|
||||
class RealOverride(override var p: DPoint) : GenericMFVCHolder<DPoint>, ReifiedMFVCHolder, GenericMFVCHolderWithMFVCUpperBound<DPoint> {
|
||||
override var p1: DPoint
|
||||
get() = throw DataClassException(13)
|
||||
set(value) = throw DataClassException(14 to value)
|
||||
}
|
||||
|
||||
class GenericFakeOverride : GenericMFVCHolderWithImpls<DPoint>
|
||||
class ReifiedFakeOverride : ReifiedMFVCHolderWithImpls
|
||||
class GenericFakeOverrideWithMFVCUpperBound : GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>
|
||||
|
||||
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVC(val field1: MyDouble, val field2: MyDouble) : GenericMFVCHolderWithImpls<DPoint>
|
||||
@JvmInline
|
||||
value class ReifiedFakeOverrideMFVC(val field1: MyDouble, val field2: MyDouble) : ReifiedMFVCHolderWithImpls
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVCWithMFVCUpperBound(val field1: MyDouble, val field2: MyDouble) : GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>
|
||||
|
||||
|
||||
interface SomePointInterface<T> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: DPoint
|
||||
}
|
||||
|
||||
interface SomePointInterfaceWithMFVCBound<T : DPoint> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: DPoint
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class DPointWithInterface(val x: MyDouble, val y: MyDouble) : SomePointInterface<DPoint>, SomePointInterfaceWithMFVCBound<DPoint> {
|
||||
override var somethingGeneric: DPoint
|
||||
get() = throw DataClassException(15)
|
||||
set(value) = throw DataClassException(16 to value)
|
||||
|
||||
override var somethingMFVC: DPoint
|
||||
get() = throw DataClassException(17)
|
||||
set(value) = throw DataClassException(18 to value)
|
||||
|
||||
override var somethingRegular: Int
|
||||
get() = throw DataClassException(19)
|
||||
set(value) = throw DataClassException(20 to value)
|
||||
}
|
||||
|
||||
|
||||
interface AbstractSegment<T> {
|
||||
val p1: T
|
||||
val p2: T
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class DSegment(override val p1: DPoint, override val p2: DPoint): AbstractSegment<DPoint>
|
||||
|
||||
fun <T> equal(expected: () -> T, actual: () -> T) {
|
||||
val expectedResult = runCatching { expected() }
|
||||
val actualResult = runCatching { actual() }
|
||||
require(expectedResult == actualResult) { "Expected: $expectedResult\nActual: $actualResult" }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val dPoint = DPoint(1.0.my, 2.0.my)
|
||||
|
||||
val lam1: () -> DPoint = { throw DataClassException(1) }
|
||||
val lam2: () -> Unit = { throw DataClassException(2 to dPoint) }
|
||||
val lam3: () -> DPoint = { throw DataClassException(3) }
|
||||
val lam4: () -> Unit = { throw DataClassException(4 to dPoint) }
|
||||
val lam5: () -> DPoint = { throw DataClassException(5) }
|
||||
val lam6: () -> Unit = { throw DataClassException(6 to dPoint) }
|
||||
val lam7: () -> DPoint = { throw DataClassException(7) }
|
||||
val lam8: () -> Unit = { throw DataClassException(8 to dPoint) }
|
||||
val lam9: () -> DPoint = { throw DataClassException(9) }
|
||||
val lam10: () -> Unit = { throw DataClassException(10 to dPoint) }
|
||||
val lam11: () -> DPoint = { throw DataClassException(11) }
|
||||
val lam12: () -> Unit = { throw DataClassException(12 to dPoint) }
|
||||
val lam13: () -> DPoint = { throw DataClassException(13) }
|
||||
val lam14: () -> Unit = { throw DataClassException(14 to dPoint) }
|
||||
val lam15: () -> DPoint = { throw DataClassException(15) }
|
||||
val lam16: () -> Unit = { throw DataClassException(16 to dPoint) }
|
||||
val lam17: () -> DPoint = { throw DataClassException(17) }
|
||||
val lam18: () -> Unit = { throw DataClassException(18 to dPoint) }
|
||||
val lam19: () -> Int = { throw DataClassException(19) }
|
||||
val lam20: () -> Unit = { throw DataClassException(20 to 1) }
|
||||
val emptyLam = {}
|
||||
val dPointLam = { dPoint }
|
||||
val otherDPoint = DPoint(3.0.my, 4.0.my)
|
||||
val otherDPointLam = { otherDPoint }
|
||||
equal({ "DPoint(x=MyDouble(value=1.0), y=MyDouble(value=2.0))" }, { dPoint.toString() })
|
||||
equal({ "DPoint(x=MyDouble(value=1.0), y=MyDouble(value=2.0))" }, { (dPoint as Any).toString() })
|
||||
|
||||
equal({ true }, { dPoint.equals(dPoint) })
|
||||
equal({ true }, { dPoint.equals(dPoint as Any) })
|
||||
equal({ true }, { (dPoint as Any).equals(dPoint) })
|
||||
equal({ true }, { (dPoint as Any).equals(dPoint as Any) })
|
||||
|
||||
equal({ false }, { dPoint.equals(otherDPoint) })
|
||||
equal({ false }, { dPoint.equals(otherDPoint as Any) })
|
||||
equal({ false }, { (dPoint as Any).equals(otherDPoint) })
|
||||
equal({ false }, { (dPoint as Any).equals(otherDPoint as Any) })
|
||||
|
||||
equal({ dPoint.hashCode() }, { (dPoint as Any).hashCode() })
|
||||
|
||||
equal({ 1.0.my }, { dPoint.x })
|
||||
equal({ 1.0.my }, { (dPoint as AbstractPoint<Double>).x })
|
||||
equal({ 2.0.my }, { dPoint.y })
|
||||
equal({ 2.0.my }, { (dPoint as AbstractPoint<Double>).y })
|
||||
|
||||
|
||||
val realOverride = RealOverride(dPoint)
|
||||
|
||||
equal(dPointLam, { realOverride.p })
|
||||
equal(dPointLam, { (realOverride as GenericMFVCHolder<DPoint>).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolder<DPoint>).p1 })
|
||||
equal(dPointLam, { (realOverride as ReifiedMFVCHolder).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as ReifiedMFVCHolder).p1 })
|
||||
equal(dPointLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p1 })
|
||||
|
||||
|
||||
equal(emptyLam, { realOverride.p = dPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolder<DPoint>).p = dPoint })
|
||||
equal(lam14, { realOverride.p1 = dPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolder<DPoint>).p1 = dPoint })
|
||||
equal(emptyLam, { (realOverride as ReifiedMFVCHolder).p = dPoint })
|
||||
equal(lam14, { (realOverride as ReifiedMFVCHolder).p1 = dPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p = dPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val genericFakeOverride = GenericFakeOverride()
|
||||
|
||||
equal(lam1, { genericFakeOverride.p })
|
||||
equal(lam1, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p })
|
||||
equal(lam3, { genericFakeOverride.p1 })
|
||||
equal(lam3, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p1 })
|
||||
val reifiedFakeOverride = ReifiedFakeOverride()
|
||||
equal(lam9, { reifiedFakeOverride.p })
|
||||
equal(lam9, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p })
|
||||
equal(lam11, { reifiedFakeOverride.p1 })
|
||||
equal(lam11, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p1 })
|
||||
val genericFakeOverrideWithMFVCUpperBound = GenericFakeOverrideWithMFVCUpperBound()
|
||||
equal(lam5, { genericFakeOverrideWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p })
|
||||
equal(lam7, { genericFakeOverrideWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverride.p = dPoint })
|
||||
equal(lam2, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam4, { genericFakeOverride.p1 = dPoint })
|
||||
equal(lam4, { (genericFakeOverride as GenericMFVCHolderWithImpls<DPoint>).p1 = dPoint })
|
||||
equal(lam10, { reifiedFakeOverride.p = dPoint })
|
||||
equal(lam10, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p = dPoint })
|
||||
equal(lam12, { reifiedFakeOverride.p1 = dPoint })
|
||||
equal(lam12, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls).p1 = dPoint })
|
||||
equal(lam6, { genericFakeOverrideWithMFVCUpperBound.p = dPoint })
|
||||
equal(lam6, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam8, { genericFakeOverrideWithMFVCUpperBound.p1 = dPoint })
|
||||
equal(lam8, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val genericFakeOverrideMFVC = GenericFakeOverrideMFVC(1.0.my, 2.0.my)
|
||||
|
||||
equal(lam1, { genericFakeOverrideMFVC.p })
|
||||
equal(lam1, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p })
|
||||
equal(lam3, { genericFakeOverrideMFVC.p1 })
|
||||
equal(lam3, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p1 })
|
||||
|
||||
val reifiedFakeOverrideMFVC = ReifiedFakeOverrideMFVC(1.0.my, 2.0.my)
|
||||
equal(lam9, { reifiedFakeOverrideMFVC.p })
|
||||
equal(lam9, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p })
|
||||
equal(lam11, { reifiedFakeOverrideMFVC.p1 })
|
||||
equal(lam11, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p1 })
|
||||
|
||||
val genericFakeOverrideMFVCWithMFVCUpperBound = GenericFakeOverrideMFVCWithMFVCUpperBound(1.0.my, 2.0.my)
|
||||
equal(lam5, { genericFakeOverrideMFVCWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p })
|
||||
equal(lam7, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverrideMFVC.p = dPoint })
|
||||
equal(lam2, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam4, { genericFakeOverrideMFVC.p1 = dPoint })
|
||||
equal(lam4, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
equal(lam10, { reifiedFakeOverrideMFVC.p = dPoint })
|
||||
equal(lam10, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p = dPoint })
|
||||
equal(lam12, { reifiedFakeOverrideMFVC.p1 = dPoint })
|
||||
equal(lam12, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls).p1 = dPoint })
|
||||
|
||||
equal(lam6, { genericFakeOverrideMFVCWithMFVCUpperBound.p = dPoint })
|
||||
equal(lam6, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p = dPoint })
|
||||
equal(lam8, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 = dPoint })
|
||||
equal(lam8, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<DPoint>).p1 = dPoint })
|
||||
|
||||
|
||||
val dPointWithInterface = DPointWithInterface(1.0.my, 2.0.my)
|
||||
|
||||
equal(lam15, { dPointWithInterface.somethingGeneric })
|
||||
equal(lam15, { (dPointWithInterface as SomePointInterface<DPoint>).somethingGeneric })
|
||||
equal(lam19, { dPointWithInterface.somethingRegular })
|
||||
equal(lam19, { (dPointWithInterface as SomePointInterface<DPoint>).somethingRegular })
|
||||
equal(lam17, { dPointWithInterface.somethingMFVC })
|
||||
equal(lam17, { (dPointWithInterface as SomePointInterface<DPoint>).somethingMFVC })
|
||||
|
||||
equal(lam15, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingGeneric })
|
||||
equal(lam19, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingRegular })
|
||||
equal(lam17, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingMFVC })
|
||||
|
||||
equal(lam16, { dPointWithInterface.somethingGeneric = dPoint })
|
||||
equal(lam16, { (dPointWithInterface as SomePointInterface<DPoint>).somethingGeneric = dPoint })
|
||||
equal(lam20, { dPointWithInterface.somethingRegular = 1 })
|
||||
equal(lam20, { (dPointWithInterface as SomePointInterface<DPoint>).somethingRegular = 1 })
|
||||
equal(lam18, { dPointWithInterface.somethingMFVC = dPoint })
|
||||
equal(lam18, { (dPointWithInterface as SomePointInterface<DPoint>).somethingMFVC = dPoint })
|
||||
|
||||
equal(lam16, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingGeneric = dPoint })
|
||||
equal(lam20, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingRegular = 1 })
|
||||
equal(lam18, { (dPointWithInterface as SomePointInterfaceWithMFVCBound<DPoint>).somethingMFVC = dPoint })
|
||||
|
||||
|
||||
val dSegment = DSegment(dPoint, otherDPoint)
|
||||
|
||||
equal(dPointLam, { dSegment.p1 })
|
||||
equal(otherDPointLam, { dSegment.p2 })
|
||||
equal({ 1.0.my }, { dPoint.x })
|
||||
equal({ 1.0.my }, { dSegment.p1.x })
|
||||
equal({ 3.0.my }, { otherDPoint.x })
|
||||
equal({ 3.0.my }, { dSegment.p2.x })
|
||||
equal({ 2.0.my }, { dPoint.y })
|
||||
equal({ 2.0.my }, { dSegment.p1.y })
|
||||
equal({ 4.0.my }, { otherDPoint.y })
|
||||
equal({ 4.0.my }, { dSegment.p2.y })
|
||||
equal(dPointLam, { (dSegment as AbstractSegment<DPoint>).p1 })
|
||||
equal(otherDPointLam, { (dSegment as AbstractSegment<DPoint>).p2 })
|
||||
equal({ 1.0.my }, { (dSegment as AbstractSegment<DPoint>).p1.x })
|
||||
equal({ 3.0.my }, { (dSegment as AbstractSegment<DPoint>).p2.x })
|
||||
equal({ 2.0.my }, { (dSegment as AbstractSegment<DPoint>).p1.y })
|
||||
equal({ 4.0.my }, { (dSegment as AbstractSegment<DPoint>).p2.y })
|
||||
|
||||
return "OK"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,327 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// LANGUAGE: +GenericInlineClassParameter
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
interface AbstractPoint<T> {
|
||||
val x: T
|
||||
val y: T
|
||||
}
|
||||
|
||||
interface SomeInterface<X> {
|
||||
fun <T, R: X> someFunction1(x: X, t: T, r: R) = Unit
|
||||
fun <T, R: X> someFunction2(x: XPoint<X>, t: XPoint<T>, r: XPoint<R>) = Unit
|
||||
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class XPoint<X>(override val x: X, override val y: X): AbstractPoint<X>, SomeInterface<X> {
|
||||
override fun <T, R: X> someFunction1(x: X, t: T, r: R) = Unit
|
||||
override fun <T, R: X> someFunction2(x: XPoint<X>, t: XPoint<T>, r: XPoint<R>) = Unit
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class YPoint<X>(val x: X)
|
||||
|
||||
fun <S: List<Int>> genericFunctionMFVC(v: XPoint<S>) {}
|
||||
fun <S: List<Int>> genericFunctionIC(v: YPoint<S>) {}
|
||||
|
||||
interface GenericMFVCHolder<T> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBound<X, T : XPoint<X>> {
|
||||
var p: T
|
||||
var p1: T
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolder<X> {
|
||||
var p: XPoint<X>
|
||||
var p1: XPoint<X>
|
||||
}
|
||||
|
||||
data class DataClassException(val value: Any?): Exception()
|
||||
|
||||
interface GenericMFVCHolderWithImpls<T> {
|
||||
var p: T
|
||||
get() = throw DataClassException(1)
|
||||
set(value) = throw DataClassException(2 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(3)
|
||||
set(value) = throw DataClassException(4 to value)
|
||||
}
|
||||
|
||||
interface GenericMFVCHolderWithMFVCUpperBoundWithImpls<X, T : XPoint<X>> {
|
||||
var p: T
|
||||
get() = throw DataClassException(5)
|
||||
set(value) = throw DataClassException(6 to value)
|
||||
|
||||
var p1: T
|
||||
get() = throw DataClassException(7)
|
||||
set(value) = throw DataClassException(8 to value)
|
||||
}
|
||||
|
||||
interface ReifiedMFVCHolderWithImpls<X> {
|
||||
var p: XPoint<X>
|
||||
get() = throw DataClassException(9)
|
||||
set(value) = throw DataClassException(10 to value)
|
||||
|
||||
var p1: XPoint<X>
|
||||
get() = throw DataClassException(11)
|
||||
set(value) = throw DataClassException(12 to value)
|
||||
}
|
||||
|
||||
class RealOverride<X>(override var p: XPoint<X>) : GenericMFVCHolder<XPoint<X>>, ReifiedMFVCHolder<X>, GenericMFVCHolderWithMFVCUpperBound<X, XPoint<X>> {
|
||||
override var p1: XPoint<X>
|
||||
get() = throw DataClassException(13)
|
||||
set(value) = throw DataClassException(14 to value)
|
||||
}
|
||||
|
||||
class GenericFakeOverride<X> : GenericMFVCHolderWithImpls<XPoint<X>>
|
||||
class ReifiedFakeOverride<X> : ReifiedMFVCHolderWithImpls<X>
|
||||
class GenericFakeOverrideWithMFVCUpperBound<X> : GenericMFVCHolderWithMFVCUpperBoundWithImpls<X, XPoint<X>>
|
||||
|
||||
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVC<X>(val field1: X, val field2: X) : GenericMFVCHolderWithImpls<XPoint<X>>
|
||||
@JvmInline
|
||||
value class ReifiedFakeOverrideMFVC<X>(val field1: X, val field2: X) : ReifiedMFVCHolderWithImpls<X>
|
||||
@JvmInline
|
||||
value class GenericFakeOverrideMFVCWithMFVCUpperBound<X>(val field1: X, val field2: X) : GenericMFVCHolderWithMFVCUpperBoundWithImpls<X, XPoint<X>>
|
||||
|
||||
|
||||
interface SomePointInterface<X, T> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: XPoint<X>
|
||||
}
|
||||
|
||||
interface SomePointInterfaceWithMFVCBound<X, T : XPoint<X>> {
|
||||
var somethingRegular: Int
|
||||
|
||||
var somethingGeneric: T
|
||||
|
||||
var somethingMFVC: XPoint<X>
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class XPointWithInterface<X, Y, Z>(val x: Y, val y: Z) : SomePointInterface<X, XPoint<X>>, SomePointInterfaceWithMFVCBound<X, XPoint<X>> {
|
||||
override var somethingGeneric: XPoint<X>
|
||||
get() = throw DataClassException(15)
|
||||
set(value) = throw DataClassException(16 to value)
|
||||
|
||||
override var somethingMFVC: XPoint<X>
|
||||
get() = throw DataClassException(17)
|
||||
set(value) = throw DataClassException(18 to value)
|
||||
|
||||
override var somethingRegular: Int
|
||||
get() = throw DataClassException(19)
|
||||
set(value) = throw DataClassException(20 to value)
|
||||
}
|
||||
|
||||
|
||||
interface AbstractSegment<T> {
|
||||
val p1: T
|
||||
val p2: T
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class XSegment<X>(override val p1: XPoint<X>, override val p2: XPoint<X>): AbstractSegment<XPoint<X>>
|
||||
|
||||
fun <T> equal(expected: () -> T, actual: () -> T) {
|
||||
val expectedResult = runCatching { expected() }
|
||||
val actualResult = runCatching { actual() }
|
||||
require(expectedResult == actualResult) { "Expected: $expectedResult\nActual: $actualResult" }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val xPoint = XPoint(1.0, 2.0)
|
||||
|
||||
val lam1: () -> XPoint<Double> = { throw DataClassException(1) }
|
||||
val lam2: () -> Unit = { throw DataClassException(2 to xPoint) }
|
||||
val lam3: () -> XPoint<Double> = { throw DataClassException(3) }
|
||||
val lam4: () -> Unit = { throw DataClassException(4 to xPoint) }
|
||||
val lam5: () -> XPoint<Double> = { throw DataClassException(5) }
|
||||
val lam6: () -> Unit = { throw DataClassException(6 to xPoint) }
|
||||
val lam7: () -> XPoint<Double> = { throw DataClassException(7) }
|
||||
val lam8: () -> Unit = { throw DataClassException(8 to xPoint) }
|
||||
val lam9: () -> XPoint<Double> = { throw DataClassException(9) }
|
||||
val lam10: () -> Unit = { throw DataClassException(10 to xPoint) }
|
||||
val lam11: () -> XPoint<Double> = { throw DataClassException(11) }
|
||||
val lam12: () -> Unit = { throw DataClassException(12 to xPoint) }
|
||||
val lam13: () -> XPoint<Double> = { throw DataClassException(13) }
|
||||
val lam14: () -> Unit = { throw DataClassException(14 to xPoint) }
|
||||
val lam15: () -> XPoint<Double> = { throw DataClassException(15) }
|
||||
val lam16: () -> Unit = { throw DataClassException(16 to xPoint) }
|
||||
val lam17: () -> XPoint<Double> = { throw DataClassException(17) }
|
||||
val lam18: () -> Unit = { throw DataClassException(18 to xPoint) }
|
||||
val lam19: () -> Int = { throw DataClassException(19) }
|
||||
val lam20: () -> Unit = { throw DataClassException(20 to 1) }
|
||||
val emptyLam = {}
|
||||
val xPointLam = { xPoint }
|
||||
val otherXPoint = XPoint(3.0, 4.0)
|
||||
val otherXPointLam = { otherXPoint }
|
||||
equal({ "XPoint(x=1.0, y=2.0)" }, { xPoint.toString() })
|
||||
equal({ "XPoint(x=1.0, y=2.0)" }, { (xPoint as Any).toString() })
|
||||
|
||||
equal({ true }, { xPoint.equals(xPoint) })
|
||||
equal({ true }, { xPoint.equals(xPoint as Any) })
|
||||
equal({ true }, { (xPoint as Any).equals(xPoint) })
|
||||
equal({ true }, { (xPoint as Any).equals(xPoint as Any) })
|
||||
|
||||
equal({ false }, { xPoint.equals(otherXPoint) })
|
||||
equal({ false }, { xPoint.equals(otherXPoint as Any) })
|
||||
equal({ false }, { (xPoint as Any).equals(otherXPoint) })
|
||||
equal({ false }, { (xPoint as Any).equals(otherXPoint as Any) })
|
||||
|
||||
equal({ xPoint.hashCode() }, { (xPoint as Any).hashCode() })
|
||||
|
||||
equal({ 1.0 }, { xPoint.x })
|
||||
equal({ 1.0 }, { (xPoint as AbstractPoint<Double>).x })
|
||||
equal({ 2.0 }, { xPoint.y })
|
||||
equal({ 2.0 }, { (xPoint as AbstractPoint<Double>).y })
|
||||
|
||||
|
||||
val realOverride = RealOverride(xPoint)
|
||||
|
||||
equal(xPointLam, { realOverride.p })
|
||||
equal(xPointLam, { (realOverride as GenericMFVCHolder<XPoint<Double>>).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolder<XPoint<Double>>).p1 })
|
||||
equal(xPointLam, { (realOverride as ReifiedMFVCHolder<Double>).p })
|
||||
equal(lam13, { realOverride.p1 })
|
||||
equal(lam13, { (realOverride as ReifiedMFVCHolder<Double>).p1 })
|
||||
equal(xPointLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<Double, XPoint<Double>>).p })
|
||||
equal(lam13, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<Double, XPoint<Double>>).p1 })
|
||||
|
||||
|
||||
equal(emptyLam, { realOverride.p = xPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolder<XPoint<Double>>).p = xPoint })
|
||||
equal(lam14, { realOverride.p1 = xPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolder<XPoint<Double>>).p1 = xPoint })
|
||||
equal(emptyLam, { (realOverride as ReifiedMFVCHolder<Double>).p = xPoint })
|
||||
equal(lam14, { (realOverride as ReifiedMFVCHolder<Double>).p1 = xPoint })
|
||||
equal(emptyLam, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<Double, XPoint<Double>>).p = xPoint })
|
||||
equal(lam14, { (realOverride as GenericMFVCHolderWithMFVCUpperBound<Double, XPoint<Double>>).p1 = xPoint })
|
||||
|
||||
|
||||
val genericFakeOverride = GenericFakeOverride<Double>()
|
||||
|
||||
equal(lam1, { genericFakeOverride.p })
|
||||
equal(lam1, { (genericFakeOverride as GenericMFVCHolderWithImpls<XPoint<Double>>).p })
|
||||
equal(lam3, { genericFakeOverride.p1 })
|
||||
equal(lam3, { (genericFakeOverride as GenericMFVCHolderWithImpls<XPoint<Double>>).p1 })
|
||||
val reifiedFakeOverride = ReifiedFakeOverride<Double>()
|
||||
equal(lam9, { reifiedFakeOverride.p })
|
||||
equal(lam9, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls<Double>).p })
|
||||
equal(lam11, { reifiedFakeOverride.p1 })
|
||||
equal(lam11, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls<Double>).p1 })
|
||||
val genericFakeOverrideWithMFVCUpperBound = GenericFakeOverrideWithMFVCUpperBound<Double>()
|
||||
equal(lam5, { genericFakeOverrideWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p })
|
||||
equal(lam7, { genericFakeOverrideWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverride.p = xPoint })
|
||||
equal(lam2, { (genericFakeOverride as GenericMFVCHolderWithImpls<XPoint<Double>>).p = xPoint })
|
||||
equal(lam4, { genericFakeOverride.p1 = xPoint })
|
||||
equal(lam4, { (genericFakeOverride as GenericMFVCHolderWithImpls<XPoint<Double>>).p1 = xPoint })
|
||||
equal(lam10, { reifiedFakeOverride.p = xPoint })
|
||||
equal(lam10, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls<Double>).p = xPoint })
|
||||
equal(lam12, { reifiedFakeOverride.p1 = xPoint })
|
||||
equal(lam12, { (reifiedFakeOverride as ReifiedMFVCHolderWithImpls<Double>).p1 = xPoint })
|
||||
equal(lam6, { genericFakeOverrideWithMFVCUpperBound.p = xPoint })
|
||||
equal(lam6, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p = xPoint })
|
||||
equal(lam8, { genericFakeOverrideWithMFVCUpperBound.p1 = xPoint })
|
||||
equal(lam8, { (genericFakeOverrideWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p1 = xPoint })
|
||||
|
||||
|
||||
val genericFakeOverrideMFVC = GenericFakeOverrideMFVC(1.0, 2.0)
|
||||
|
||||
equal(lam1, { genericFakeOverrideMFVC.p })
|
||||
equal(lam1, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<XPoint<Double>>).p })
|
||||
equal(lam3, { genericFakeOverrideMFVC.p1 })
|
||||
equal(lam3, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<XPoint<Double>>).p1 })
|
||||
|
||||
val reifiedFakeOverrideMFVC = ReifiedFakeOverrideMFVC(1.0, 2.0)
|
||||
equal(lam9, { reifiedFakeOverrideMFVC.p })
|
||||
equal(lam9, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls<Double>).p })
|
||||
equal(lam11, { reifiedFakeOverrideMFVC.p1 })
|
||||
equal(lam11, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls<Double>).p1 })
|
||||
|
||||
val genericFakeOverrideMFVCWithMFVCUpperBound = GenericFakeOverrideMFVCWithMFVCUpperBound(1.0, 2.0)
|
||||
equal(lam5, { genericFakeOverrideMFVCWithMFVCUpperBound.p })
|
||||
equal(lam5, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p })
|
||||
equal(lam7, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 })
|
||||
equal(lam7, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p1 })
|
||||
|
||||
equal(lam2, { genericFakeOverrideMFVC.p = xPoint })
|
||||
equal(lam2, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<XPoint<Double>>).p = xPoint })
|
||||
equal(lam4, { genericFakeOverrideMFVC.p1 = xPoint })
|
||||
equal(lam4, { (genericFakeOverrideMFVC as GenericMFVCHolderWithImpls<XPoint<Double>>).p1 = xPoint })
|
||||
|
||||
equal(lam10, { reifiedFakeOverrideMFVC.p = xPoint })
|
||||
equal(lam10, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls<Double>).p = xPoint })
|
||||
equal(lam12, { reifiedFakeOverrideMFVC.p1 = xPoint })
|
||||
equal(lam12, { (reifiedFakeOverrideMFVC as ReifiedMFVCHolderWithImpls<Double>).p1 = xPoint })
|
||||
|
||||
equal(lam6, { genericFakeOverrideMFVCWithMFVCUpperBound.p = xPoint })
|
||||
equal(lam6, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p = xPoint })
|
||||
equal(lam8, { genericFakeOverrideMFVCWithMFVCUpperBound.p1 = xPoint })
|
||||
equal(lam8, { (genericFakeOverrideMFVCWithMFVCUpperBound as GenericMFVCHolderWithMFVCUpperBoundWithImpls<Double, XPoint<Double>>).p1 = xPoint })
|
||||
|
||||
|
||||
val xPointWithInterface = XPointWithInterface<Double, Double, Double>(1.0, 2.0)
|
||||
|
||||
equal(lam15, { xPointWithInterface.somethingGeneric })
|
||||
equal(lam15, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingGeneric })
|
||||
equal(lam19, { xPointWithInterface.somethingRegular })
|
||||
equal(lam19, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingRegular })
|
||||
equal(lam17, { xPointWithInterface.somethingMFVC })
|
||||
equal(lam17, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingMFVC })
|
||||
|
||||
equal(lam15, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingGeneric })
|
||||
equal(lam19, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingRegular })
|
||||
equal(lam17, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingMFVC })
|
||||
|
||||
equal(lam16, { xPointWithInterface.somethingGeneric = xPoint })
|
||||
equal(lam16, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingGeneric = xPoint })
|
||||
equal(lam20, { xPointWithInterface.somethingRegular = 1 })
|
||||
equal(lam20, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingRegular = 1 })
|
||||
equal(lam18, { xPointWithInterface.somethingMFVC = xPoint })
|
||||
equal(lam18, { (xPointWithInterface as SomePointInterface<Double, XPoint<Double>>).somethingMFVC = xPoint })
|
||||
|
||||
equal(lam16, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingGeneric = xPoint })
|
||||
equal(lam20, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingRegular = 1 })
|
||||
equal(lam18, { (xPointWithInterface as SomePointInterfaceWithMFVCBound<Double, XPoint<Double>>).somethingMFVC = xPoint })
|
||||
|
||||
|
||||
val xSegment = XSegment(xPoint, otherXPoint)
|
||||
|
||||
equal(xPointLam, { xSegment.p1 })
|
||||
equal(otherXPointLam, { xSegment.p2 })
|
||||
equal({ 1.0 }, { xPoint.x })
|
||||
equal({ 1.0 }, { xSegment.p1.x })
|
||||
equal({ 3.0 }, { otherXPoint.x })
|
||||
equal({ 3.0 }, { xSegment.p2.x })
|
||||
equal({ 2.0 }, { xPoint.y })
|
||||
equal({ 2.0 }, { xSegment.p1.y })
|
||||
equal({ 4.0 }, { otherXPoint.y })
|
||||
equal({ 4.0 }, { xSegment.p2.y })
|
||||
equal(xPointLam, { (xSegment as AbstractSegment<XPoint<Double>>).p1 })
|
||||
equal(otherXPointLam, { (xSegment as AbstractSegment<XPoint<Double>>).p2 })
|
||||
equal({ 1.0 }, { (xSegment as AbstractSegment<XPoint<Double>>).p1.x })
|
||||
equal({ 3.0 }, { (xSegment as AbstractSegment<XPoint<Double>>).p2.x })
|
||||
equal({ 2.0 }, { (xSegment as AbstractSegment<XPoint<Double>>).p1.y })
|
||||
equal({ 4.0 }, { (xSegment as AbstractSegment<XPoint<Double>>).p2.y })
|
||||
|
||||
return "OK"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,34 +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 PointBox(var value: DPoint)
|
||||
|
||||
fun box(): String {
|
||||
var p = DPoint(1.0, 2.0)
|
||||
try {
|
||||
p = DPoint(3.0, error("Failure"))
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
if (p != DPoint(1.0, 2.0)) {
|
||||
return "Partially reassigned variable"
|
||||
}
|
||||
|
||||
val box = PointBox(p)
|
||||
|
||||
try {
|
||||
box.value = DPoint(3.0, error("Failure"))
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
|
||||
if (box.value != DPoint(1.0, 2.0)) {
|
||||
return "Partially reassigned field"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class DPoint {
|
||||
// source: 'throwingMFVCReassignments.kt'
|
||||
private final field field-0: double
|
||||
private final field field-1: double
|
||||
private synthetic method <init>(p0: double, p1: double): void
|
||||
public synthetic final static method box-impl(p0: double, p1: double): DPoint
|
||||
public final static method constructor-impl(p0: double, p1: double): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: double, p1: double, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: double, p1: double, p2: double, p3: double): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: double, p1: double): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: double, p1: double): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): double
|
||||
public synthetic final method unbox-impl-1(): double
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class PointBox {
|
||||
// source: 'throwingMFVCReassignments.kt'
|
||||
private field value-0: double
|
||||
private field value-1: double
|
||||
public method <init>(p0: double, p1: double): void
|
||||
public final @org.jetbrains.annotations.NotNull method getValue(): DPoint
|
||||
public synthetic final method getValue-0(): double
|
||||
public synthetic final method getValue-1(): double
|
||||
public final method setValue-sUp7gFk(p0: double, p1: double): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class ThrowingMFVCReassignmentsKt {
|
||||
// source: 'throwingMFVCReassignments.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// 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) {
|
||||
init {
|
||||
require(x != 0.0 && y != 0.0)
|
||||
}
|
||||
}
|
||||
|
||||
fun tryOk() = try {
|
||||
DPoint(1.0, 2.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(0.0, 3.0)
|
||||
} finally {
|
||||
DPoint(4.0, 5.0)
|
||||
}
|
||||
|
||||
fun tryFail1() = try {
|
||||
DPoint(0.0, 1.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(2.0, 3.0)
|
||||
} finally {
|
||||
DPoint(4.0, 5.0)
|
||||
}
|
||||
|
||||
fun tryFail2() = try {
|
||||
DPoint(1.0, 2.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(3.0, 4.0)
|
||||
} finally {
|
||||
DPoint(5.0, 0.0)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
require(runCatching { tryOk() } == Result.success(DPoint(1.0, 2.0)))
|
||||
require(runCatching { tryFail1() } == Result.success(DPoint(2.0, 3.0)))
|
||||
require(runCatching { tryFail2() }.isFailure)
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class DPoint {
|
||||
// source: 'tryExpressions.kt'
|
||||
private final field field-0: double
|
||||
private final field field-1: double
|
||||
private synthetic method <init>(p0: double, p1: double): void
|
||||
public synthetic final static method box-impl(p0: double, p1: double): DPoint
|
||||
public final static method constructor-impl(p0: double, p1: double): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: double, p1: double, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: double, p1: double, p2: double, p3: double): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: double, p1: double): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: double, p1: double): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): double
|
||||
public synthetic final method unbox-impl-1(): double
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class TryExpressionsKt {
|
||||
// source: 'tryExpressions.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method tryFail1(): DPoint
|
||||
public final static @org.jetbrains.annotations.NotNull method tryFail2(): DPoint
|
||||
public final static @org.jetbrains.annotations.NotNull method tryOk(): DPoint
|
||||
public final inner class kotlin/Result$Companion
|
||||
}
|
||||
@@ -1,296 +0,0 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class Public(val x: Int, val y: Int) {
|
||||
companion object {
|
||||
var x: Int = 0
|
||||
val y: Int
|
||||
get() = 1
|
||||
var z: Public = Public(0, 0)
|
||||
val t: Public
|
||||
get() = Public(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class Internal(internal val x: Int, internal val y: Int) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
var x: Int = 0
|
||||
|
||||
@JvmStatic
|
||||
val y: Int
|
||||
get() = 1
|
||||
var z: Internal = Internal(0, 0)
|
||||
|
||||
@JvmStatic
|
||||
val t: Internal
|
||||
get() = Internal(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class Private(private val x: Int, private val y: Int)
|
||||
|
||||
@JvmInline
|
||||
value class PublicPublic(val value: Public)
|
||||
|
||||
@JvmInline
|
||||
value class InternalPublic(internal val value: Public)
|
||||
|
||||
@JvmInline
|
||||
value class PrivatePublic(private val value: Public)
|
||||
|
||||
@JvmInline
|
||||
value class PublicInternal(val value: Internal)
|
||||
|
||||
@JvmInline
|
||||
value class InternalInternal(internal val value: Internal)
|
||||
|
||||
@JvmInline
|
||||
value class PrivateInternal(private val value: Internal)
|
||||
|
||||
@JvmInline
|
||||
value class PublicPrivate(val value: Private)
|
||||
|
||||
@JvmInline
|
||||
value class InternalPrivate(internal val value: Private)
|
||||
|
||||
@JvmInline
|
||||
value class PrivatePrivate(private val value: Private)
|
||||
|
||||
class Regular {
|
||||
var x1: Public = Public(1, 2)
|
||||
internal var x2: Public = Public(3, 4)
|
||||
private var x3: Public = Public(5, 6)
|
||||
|
||||
var x4: Public = Public(7, 8)
|
||||
private set
|
||||
internal var x5: Public = Public(9, 10)
|
||||
private set
|
||||
|
||||
var x6: Public = Public(11, 12)
|
||||
internal set
|
||||
|
||||
|
||||
var y1: Internal = Internal(13, 14)
|
||||
internal var y2: Internal = Internal(15, 16)
|
||||
private var y3: Internal = Internal(17, 18)
|
||||
|
||||
var y4: Internal = Internal(19, 20)
|
||||
private set
|
||||
internal var y5: Internal = Internal(21, 22)
|
||||
private set
|
||||
|
||||
var y6: Internal = Internal(23, 24)
|
||||
internal set
|
||||
|
||||
|
||||
var z1: Private = Private(25, 26)
|
||||
internal var z2: Private = Private(27, 28)
|
||||
private var z3: Private = Private(29, 30)
|
||||
|
||||
var z4: Private = Private(31, 32)
|
||||
private set
|
||||
internal var z5: Private = Private(33, 34)
|
||||
private set
|
||||
|
||||
var z6: Private = Private(35, 36)
|
||||
internal set
|
||||
|
||||
companion object {
|
||||
var staticX1: Public = Public(-1, -2)
|
||||
internal var staticX2: Public = Public(-3, -4)
|
||||
private var staticX3: Public = Public(-5, -6)
|
||||
|
||||
var staticX4: Public = Public(-7, -8)
|
||||
private set
|
||||
internal var staticX5: Public = Public(-9, -10)
|
||||
private set
|
||||
|
||||
var staticX6: Public = Public(-11, -12)
|
||||
internal set
|
||||
|
||||
|
||||
var staticY1: Internal = Internal(-13, -14)
|
||||
internal var staticY2: Internal = Internal(-15, -16)
|
||||
private var staticY3: Internal = Internal(-17, -18)
|
||||
|
||||
var staticY4: Internal = Internal(-19, -20)
|
||||
private set
|
||||
internal var staticY5: Internal = Internal(-21, -22)
|
||||
private set
|
||||
|
||||
var staticY6: Internal = Internal(-23, -24)
|
||||
internal set
|
||||
|
||||
|
||||
var staticZ1: Private = Private(-25, -26)
|
||||
internal var staticZ2: Private = Private(-27, -28)
|
||||
private var staticZ3: Private = Private(-29, -30)
|
||||
|
||||
var staticZ4: Private = Private(-31, -32)
|
||||
private set
|
||||
internal var staticZ5: Private = Private(-33, -34)
|
||||
private set
|
||||
|
||||
var staticZ6: Private = Private(-35, -36)
|
||||
internal set
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticX1: Public = Public(-1, -2)
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticX2: Public = Public(-3, -4)
|
||||
|
||||
@JvmStatic
|
||||
private var jvmStaticX3: Public = Public(-5, -6)
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticX4: Public = Public(-7, -8)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticX5: Public = Public(-9, -10)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticX6: Public = Public(-11, -12)
|
||||
internal set
|
||||
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticY1: Internal = Internal(-13, -14)
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticY2: Internal = Internal(-15, -16)
|
||||
|
||||
@JvmStatic
|
||||
private var jvmStaticY3: Internal = Internal(-17, -18)
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticY4: Internal = Internal(-19, -20)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticY5: Internal = Internal(-21, -22)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticY6: Internal = Internal(-23, -24)
|
||||
internal set
|
||||
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticZ1: Private = Private(-25, -26)
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticZ2: Private = Private(-27, -28)
|
||||
|
||||
@JvmStatic
|
||||
private var jvmStaticZ3: Private = Private(-29, -30)
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticZ4: Private = Private(-31, -32)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
internal var jvmStaticZ5: Private = Private(-33, -34)
|
||||
private set
|
||||
|
||||
@JvmStatic
|
||||
var jvmStaticZ6: Private = Private(-35, -36)
|
||||
internal set
|
||||
|
||||
}
|
||||
|
||||
fun callAll() {
|
||||
x1; x2; x3; x4; x5; x6
|
||||
x1.x; x1.y; x2.x; x2.y; x3.x; x3.y; x4.x; x4.y; x5.x; x5.y; x6.x; x6.y
|
||||
x1 = x1; x2 = x2; x3 = x3; x4 = x4; x5 = x5; x6 = x6
|
||||
|
||||
y1; y2; y3; y4; y5; y6
|
||||
y1.x; y1.y; y2.x; y2.y; y3.x; y3.y; y4.x; y4.y; y5.x; y5.y; y6.x; y6.y
|
||||
y1 = y1; y2 = y2; y3 = y3; y4 = y4; y5 = y5; y6 = y6
|
||||
|
||||
z1; z2; z3; z4; z5; z6
|
||||
z1 = z1; z2 = z2; z3 = z3; z4 = z4; z5 = z5; z6 = z6
|
||||
|
||||
|
||||
staticX1; staticX2; staticX3; staticX4; staticX5; staticX6
|
||||
staticX1.x; staticX1.y; staticX2.x; staticX2.y; staticX3.x; staticX3.y; staticX4.x; staticX4.y; staticX5.x; staticX5.y; staticX6.x; staticX6.y
|
||||
staticX1 = staticX1; staticX2 = staticX2; staticX3 = staticX3; staticX4 = staticX4; staticX5 = staticX5; staticX6 = staticX6
|
||||
|
||||
staticY1; staticY2; staticY3; staticY4; staticY5; staticY6
|
||||
staticY1.x; staticY1.y; staticY2.x; staticY2.y; staticY3.x; staticY3.y; staticY4.x; staticY4.y; staticY5.x; staticY5.y; staticY6.x; staticY6.y
|
||||
staticY1 = staticY1; staticY2 = staticY2; staticY3 = staticY3; staticY4 = staticY4; staticY5 = staticY5; staticY6 = staticY6
|
||||
|
||||
staticZ1; staticZ2; staticZ3; staticZ4; staticZ5; staticZ6
|
||||
staticZ1 = staticZ1; staticZ2 = staticZ2; staticZ3 = staticZ3; staticZ4 = staticZ4; staticZ5 = staticZ5; staticZ6 = staticZ6
|
||||
|
||||
|
||||
jvmStaticX1; jvmStaticX2; jvmStaticX3; jvmStaticX4; jvmStaticX5; jvmStaticX6
|
||||
jvmStaticX1.x; jvmStaticX1.y; jvmStaticX2.x; jvmStaticX2.y; jvmStaticX3.x; jvmStaticX3.y; jvmStaticX4.x; jvmStaticX4.y; jvmStaticX5.x; jvmStaticX5.y; jvmStaticX6.x; jvmStaticX6.y
|
||||
jvmStaticX1 = jvmStaticX1; jvmStaticX2 = jvmStaticX2; jvmStaticX3 = jvmStaticX3; jvmStaticX4 = jvmStaticX4; jvmStaticX5 =
|
||||
jvmStaticX5; jvmStaticX6 = jvmStaticX6
|
||||
|
||||
jvmStaticY1; jvmStaticY2; jvmStaticY3; jvmStaticY4; jvmStaticY5; jvmStaticY6
|
||||
jvmStaticY1.x; jvmStaticY1.y; jvmStaticY2.x; jvmStaticY2.y; jvmStaticY3.x; jvmStaticY3.y; jvmStaticY4.x; jvmStaticY4.y; jvmStaticY5.x; jvmStaticY5.y; jvmStaticY6.x; jvmStaticY6.y
|
||||
jvmStaticY1 = jvmStaticY1; jvmStaticY2 = jvmStaticY2; jvmStaticY3 = jvmStaticY3; jvmStaticY4 = jvmStaticY4; jvmStaticY5 =
|
||||
jvmStaticY5; jvmStaticY6 = jvmStaticY6
|
||||
|
||||
jvmStaticZ1; jvmStaticZ2; jvmStaticZ3; jvmStaticZ4; jvmStaticZ5; jvmStaticZ6
|
||||
jvmStaticZ1 = jvmStaticZ1; jvmStaticZ2 = jvmStaticZ2; jvmStaticZ3 = jvmStaticZ3; jvmStaticZ4 = jvmStaticZ4; jvmStaticZ5 =
|
||||
jvmStaticZ5; jvmStaticZ6 = jvmStaticZ6
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val r = Regular()
|
||||
r.apply {
|
||||
callAll()
|
||||
|
||||
|
||||
x1; x2; x4; x5; x6
|
||||
x1.x; x1.y; x2.x; x2.y; x4.x; x4.y; x5.x; x5.y; x6.x; x6.y
|
||||
x1 = x1; x2 = x2; x6 = x6
|
||||
|
||||
y1; y2; y4; y5; y6
|
||||
y1.x; y1.y; y2.x; y2.y; y4.x; y4.y; y5.x; y5.y; y6.x; y6.y
|
||||
y1 = y1; y2 = y2; y6 = y6
|
||||
|
||||
z1; z2; z4; z5; z6
|
||||
z1 = z1; z2 = z2; z6 = z6
|
||||
}
|
||||
|
||||
Regular.Companion.apply {
|
||||
staticX1; staticX2; staticX4; staticX5; staticX6
|
||||
staticX1.x; staticX1.y; staticX2.x; staticX2.y; staticX4.x; staticX4.y; staticX5.x; staticX5.y; staticX6.x; staticX6.y
|
||||
staticX1 = staticX1; staticX2 = staticX2; staticX6 = staticX6
|
||||
|
||||
staticY1; staticY2; staticY4; staticY5; staticY6
|
||||
staticY1.x; staticY1.y; staticY2.x; staticY2.y; staticY4.x; staticY4.y; staticY5.x; staticY5.y; staticY6.x; staticY6.y
|
||||
staticY1 = staticY1; staticY2 = staticY2; staticY6 = staticY6
|
||||
|
||||
staticZ1; staticZ2; staticZ4; staticZ5; staticZ6
|
||||
staticZ1 = staticZ1; staticZ2 = staticZ2; staticZ6 = staticZ6
|
||||
|
||||
|
||||
jvmStaticX1; jvmStaticX2; jvmStaticX4; jvmStaticX5; jvmStaticX6
|
||||
jvmStaticX1.x; jvmStaticX1.y; jvmStaticX2.x; jvmStaticX2.y; jvmStaticX4.x; jvmStaticX4.y; jvmStaticX5.x; jvmStaticX5.y; jvmStaticX6.x; jvmStaticX6.y
|
||||
jvmStaticX1 = jvmStaticX1; jvmStaticX2 = jvmStaticX2; jvmStaticX6 = jvmStaticX6
|
||||
|
||||
jvmStaticY1; jvmStaticY2; jvmStaticY4; jvmStaticY5; jvmStaticY6
|
||||
jvmStaticY1.x; jvmStaticY1.y; jvmStaticY2.x; jvmStaticY2.y; jvmStaticY4.x; jvmStaticY4.y; jvmStaticY5.x; jvmStaticY5.y; jvmStaticY6.x; jvmStaticY6.y
|
||||
jvmStaticY1 = jvmStaticY1; jvmStaticY2 = jvmStaticY2; jvmStaticY6 = jvmStaticY6
|
||||
|
||||
jvmStaticZ1; jvmStaticZ2; jvmStaticZ4; jvmStaticZ5; jvmStaticZ6
|
||||
jvmStaticZ1 = jvmStaticZ1; jvmStaticZ2 = jvmStaticZ2; jvmStaticZ6 = jvmStaticZ6
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,780 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
public final class Internal$Companion {
|
||||
// source: 'visibility.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getT$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getT(): Internal
|
||||
public synthetic final method getT-0(): int
|
||||
public synthetic final method getT-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getX$annotations(): void
|
||||
public final method getX(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getY$annotations(): void
|
||||
public final method getY(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ(): Internal
|
||||
public synthetic final method getZ-0(): int
|
||||
public synthetic final method getZ-1(): int
|
||||
public final method setX(p0: int): void
|
||||
public final method setZ-sUp7gFk(p0: int, p1: int): void
|
||||
public final inner class Internal$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class Internal {
|
||||
// source: 'visibility.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: Internal$Companion
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private static field x: int
|
||||
static method <clinit>(): void
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method access$getX$cp(): int
|
||||
public synthetic final static method access$getZ-0$cp(): int
|
||||
public synthetic final static method access$getZ-1$cp(): int
|
||||
public synthetic final static method access$setX$cp(p0: int): void
|
||||
public synthetic final static method access$setZ-0$cp(p0: int): void
|
||||
public synthetic final static method access$setZ-1$cp(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): Internal
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public final static @org.jetbrains.annotations.NotNull method getT(): Internal
|
||||
public final static method getX(): int
|
||||
public final static method getY(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public final static method setX(p0: int): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public final inner class Internal$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class InternalInternal {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): InternalInternal
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Internal
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class InternalPrivate {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): InternalPrivate
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Private
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class InternalPublic {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): InternalPublic
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Public
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class Private {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): Private
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PrivateInternal {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PrivateInternal
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Internal
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PrivatePrivate {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PrivatePrivate
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Private
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PrivatePublic {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PrivatePublic
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Public
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Public$Companion {
|
||||
// source: 'visibility.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public final @org.jetbrains.annotations.NotNull method getT(): Public
|
||||
public synthetic final method getT-0(): int
|
||||
public synthetic final method getT-1(): int
|
||||
public final method getX(): int
|
||||
public final method getY(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ(): Public
|
||||
public synthetic final method getZ-0(): int
|
||||
public synthetic final method getZ-1(): int
|
||||
public final method setX(p0: int): void
|
||||
public final method setZ-sUp7gFk(p0: int, p1: int): void
|
||||
public final inner class Public$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class Public {
|
||||
// source: 'visibility.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: Public$Companion
|
||||
private final field field-0: int
|
||||
private final field field-1: int
|
||||
private static field x: int
|
||||
static method <clinit>(): void
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method access$getX$cp(): int
|
||||
public synthetic final static method access$getZ-0$cp(): int
|
||||
public synthetic final static method access$getZ-1$cp(): int
|
||||
public synthetic final static method access$setX$cp(p0: int): void
|
||||
public synthetic final static method access$setZ-0$cp(p0: int): void
|
||||
public synthetic final static method access$setZ-1$cp(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): Public
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): int
|
||||
public synthetic final method unbox-impl-1(): int
|
||||
public final inner class Public$Companion
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PublicInternal {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PublicInternal
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Internal
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PublicPrivate {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PublicPrivate
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Private
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class PublicPublic {
|
||||
// source: 'visibility.kt'
|
||||
private final field field-0-0: int
|
||||
private final field field-0-1: int
|
||||
private synthetic method <init>(p0: int, p1: int): void
|
||||
public synthetic final static method box-impl(p0: int, p1: int): PublicPublic
|
||||
public final static method constructor-impl(p0: int, p1: int): void
|
||||
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: int, p2: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int, p2: int, p3: int): boolean
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int, p1: int): int
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int, p1: int): java.lang.String
|
||||
public synthetic final method unbox-impl-0(): Public
|
||||
public synthetic final method unbox-impl-0-0(): int
|
||||
public synthetic final method unbox-impl-0-1(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Regular$Companion {
|
||||
// source: 'visibility.kt'
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
public synthetic final static method access$getJvmStaticX3(p0: Regular$Companion): Public
|
||||
public synthetic final static method access$getJvmStaticY3(p0: Regular$Companion): Internal
|
||||
public synthetic final static method access$getJvmStaticZ3(p0: Regular$Companion): Private
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX1$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticX1(): Public
|
||||
public synthetic final method getJvmStaticX1-0(): int
|
||||
public synthetic final method getJvmStaticX1-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX2$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticX2$main(): Public
|
||||
public synthetic final method getJvmStaticX2-0(): int
|
||||
public synthetic final method getJvmStaticX2-1(): int
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX3$annotations(): void
|
||||
private final method getJvmStaticX3(): Public
|
||||
public synthetic final method getJvmStaticX3-0(): int
|
||||
public synthetic final method getJvmStaticX3-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX4$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticX4(): Public
|
||||
public synthetic final method getJvmStaticX4-0(): int
|
||||
public synthetic final method getJvmStaticX4-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX5$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticX5$main(): Public
|
||||
public synthetic final method getJvmStaticX5-0(): int
|
||||
public synthetic final method getJvmStaticX5-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticX6$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticX6(): Public
|
||||
public synthetic final method getJvmStaticX6-0(): int
|
||||
public synthetic final method getJvmStaticX6-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY1$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticY1(): Internal
|
||||
public synthetic final method getJvmStaticY1-0(): int
|
||||
public synthetic final method getJvmStaticY1-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY2$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticY2$main(): Internal
|
||||
public synthetic final method getJvmStaticY2-0(): int
|
||||
public synthetic final method getJvmStaticY2-1(): int
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY3$annotations(): void
|
||||
private final method getJvmStaticY3(): Internal
|
||||
public synthetic final method getJvmStaticY3-0(): int
|
||||
public synthetic final method getJvmStaticY3-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY4$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticY4(): Internal
|
||||
public synthetic final method getJvmStaticY4-0(): int
|
||||
public synthetic final method getJvmStaticY4-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY5$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticY5$main(): Internal
|
||||
public synthetic final method getJvmStaticY5-0(): int
|
||||
public synthetic final method getJvmStaticY5-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticY6$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticY6(): Internal
|
||||
public synthetic final method getJvmStaticY6-0(): int
|
||||
public synthetic final method getJvmStaticY6-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ1$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticZ1(): Private
|
||||
public synthetic final method getJvmStaticZ1-0(): int
|
||||
public synthetic final method getJvmStaticZ1-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ2$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticZ2$main(): Private
|
||||
public synthetic final method getJvmStaticZ2-0(): int
|
||||
public synthetic final method getJvmStaticZ2-1(): int
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ3$annotations(): void
|
||||
private final method getJvmStaticZ3(): Private
|
||||
public synthetic final method getJvmStaticZ3-0(): int
|
||||
public synthetic final method getJvmStaticZ3-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ4$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticZ4(): Private
|
||||
public synthetic final method getJvmStaticZ4-0(): int
|
||||
public synthetic final method getJvmStaticZ4-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ5$main$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticZ5$main(): Private
|
||||
public synthetic final method getJvmStaticZ5-0(): int
|
||||
public synthetic final method getJvmStaticZ5-1(): int
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getJvmStaticZ6$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getJvmStaticZ6(): Private
|
||||
public synthetic final method getJvmStaticZ6-0(): int
|
||||
public synthetic final method getJvmStaticZ6-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticX1(): Public
|
||||
public synthetic final method getStaticX1-0(): int
|
||||
public synthetic final method getStaticX1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticX2$main(): Public
|
||||
public synthetic final method getStaticX2-0(): int
|
||||
public synthetic final method getStaticX2-1(): int
|
||||
private final method getStaticX3(): Public
|
||||
public synthetic final method getStaticX3-0(): int
|
||||
public synthetic final method getStaticX3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticX4(): Public
|
||||
public synthetic final method getStaticX4-0(): int
|
||||
public synthetic final method getStaticX4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticX5$main(): Public
|
||||
public synthetic final method getStaticX5-0(): int
|
||||
public synthetic final method getStaticX5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticX6(): Public
|
||||
public synthetic final method getStaticX6-0(): int
|
||||
public synthetic final method getStaticX6-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticY1(): Internal
|
||||
public synthetic final method getStaticY1-0(): int
|
||||
public synthetic final method getStaticY1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticY2$main(): Internal
|
||||
public synthetic final method getStaticY2-0(): int
|
||||
public synthetic final method getStaticY2-1(): int
|
||||
private final method getStaticY3(): Internal
|
||||
public synthetic final method getStaticY3-0(): int
|
||||
public synthetic final method getStaticY3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticY4(): Internal
|
||||
public synthetic final method getStaticY4-0(): int
|
||||
public synthetic final method getStaticY4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticY5$main(): Internal
|
||||
public synthetic final method getStaticY5-0(): int
|
||||
public synthetic final method getStaticY5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticY6(): Internal
|
||||
public synthetic final method getStaticY6-0(): int
|
||||
public synthetic final method getStaticY6-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticZ1(): Private
|
||||
public synthetic final method getStaticZ1-0(): int
|
||||
public synthetic final method getStaticZ1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticZ2$main(): Private
|
||||
public synthetic final method getStaticZ2-0(): int
|
||||
public synthetic final method getStaticZ2-1(): int
|
||||
private final method getStaticZ3(): Private
|
||||
public synthetic final method getStaticZ3-0(): int
|
||||
public synthetic final method getStaticZ3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticZ4(): Private
|
||||
public synthetic final method getStaticZ4-0(): int
|
||||
public synthetic final method getStaticZ4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticZ5$main(): Private
|
||||
public synthetic final method getStaticZ5-0(): int
|
||||
public synthetic final method getStaticZ5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getStaticZ6(): Private
|
||||
public synthetic final method getStaticZ6-0(): int
|
||||
public synthetic final method getStaticZ6-1(): int
|
||||
public final method setJvmStaticX1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setJvmStaticX2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setJvmStaticX6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setJvmStaticY1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setJvmStaticY2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setJvmStaticY6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setJvmStaticZ1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setJvmStaticZ2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setJvmStaticZ6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticX1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setStaticX2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticX6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticY1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setStaticY2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticY6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticZ1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setStaticZ2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setStaticZ6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final inner class Regular$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Regular {
|
||||
// source: 'visibility.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: Regular$Companion
|
||||
private static field jvmStaticX1-0: int
|
||||
private static field jvmStaticX1-1: int
|
||||
private static field jvmStaticX2-0: int
|
||||
private static field jvmStaticX2-1: int
|
||||
private static field jvmStaticX3-0: int
|
||||
private static field jvmStaticX3-1: int
|
||||
private static field jvmStaticX4-0: int
|
||||
private static field jvmStaticX4-1: int
|
||||
private static field jvmStaticX5-0: int
|
||||
private static field jvmStaticX5-1: int
|
||||
private static field jvmStaticX6-0: int
|
||||
private static field jvmStaticX6-1: int
|
||||
private static field jvmStaticY1-0: int
|
||||
private static field jvmStaticY1-1: int
|
||||
private static field jvmStaticY2-0: int
|
||||
private static field jvmStaticY2-1: int
|
||||
private static field jvmStaticY3-0: int
|
||||
private static field jvmStaticY3-1: int
|
||||
private static field jvmStaticY4-0: int
|
||||
private static field jvmStaticY4-1: int
|
||||
private static field jvmStaticY5-0: int
|
||||
private static field jvmStaticY5-1: int
|
||||
private static field jvmStaticY6-0: int
|
||||
private static field jvmStaticY6-1: int
|
||||
private static field jvmStaticZ1-0: int
|
||||
private static field jvmStaticZ1-1: int
|
||||
private static field jvmStaticZ2-0: int
|
||||
private static field jvmStaticZ2-1: int
|
||||
private static field jvmStaticZ3-0: int
|
||||
private static field jvmStaticZ3-1: int
|
||||
private static field jvmStaticZ4-0: int
|
||||
private static field jvmStaticZ4-1: int
|
||||
private static field jvmStaticZ5-0: int
|
||||
private static field jvmStaticZ5-1: int
|
||||
private static field jvmStaticZ6-0: int
|
||||
private static field jvmStaticZ6-1: int
|
||||
private static field staticX1-0: int
|
||||
private static field staticX1-1: int
|
||||
private static field staticX2-0: int
|
||||
private static field staticX2-1: int
|
||||
private static field staticX3-0: int
|
||||
private static field staticX3-1: int
|
||||
private static field staticX4-0: int
|
||||
private static field staticX4-1: int
|
||||
private static field staticX5-0: int
|
||||
private static field staticX5-1: int
|
||||
private static field staticX6-0: int
|
||||
private static field staticX6-1: int
|
||||
private static field staticY1-0: int
|
||||
private static field staticY1-1: int
|
||||
private static field staticY2-0: int
|
||||
private static field staticY2-1: int
|
||||
private static field staticY3-0: int
|
||||
private static field staticY3-1: int
|
||||
private static field staticY4-0: int
|
||||
private static field staticY4-1: int
|
||||
private static field staticY5-0: int
|
||||
private static field staticY5-1: int
|
||||
private static field staticY6-0: int
|
||||
private static field staticY6-1: int
|
||||
private static field staticZ1-0: int
|
||||
private static field staticZ1-1: int
|
||||
private static field staticZ2-0: int
|
||||
private static field staticZ2-1: int
|
||||
private static field staticZ3-0: int
|
||||
private static field staticZ3-1: int
|
||||
private static field staticZ4-0: int
|
||||
private static field staticZ4-1: int
|
||||
private static field staticZ5-0: int
|
||||
private static field staticZ5-1: int
|
||||
private static field staticZ6-0: int
|
||||
private static field staticZ6-1: int
|
||||
private field x1-0: int
|
||||
private field x1-1: int
|
||||
private field x2-0: int
|
||||
private field x2-1: int
|
||||
private field x3-0: int
|
||||
private field x3-1: int
|
||||
private field x4-0: int
|
||||
private field x4-1: int
|
||||
private field x5-0: int
|
||||
private field x5-1: int
|
||||
private field x6-0: int
|
||||
private field x6-1: int
|
||||
private field y1-0: int
|
||||
private field y1-1: int
|
||||
private field y2-0: int
|
||||
private field y2-1: int
|
||||
private field y3-0: int
|
||||
private field y3-1: int
|
||||
private field y4-0: int
|
||||
private field y4-1: int
|
||||
private field y5-0: int
|
||||
private field y5-1: int
|
||||
private field y6-0: int
|
||||
private field y6-1: int
|
||||
private field z1-0: int
|
||||
private field z1-1: int
|
||||
private field z2-0: int
|
||||
private field z2-1: int
|
||||
private field z3-0: int
|
||||
private field z3-1: int
|
||||
private field z4-0: int
|
||||
private field z4-1: int
|
||||
private field z5-0: int
|
||||
private field z5-1: int
|
||||
private field z6-0: int
|
||||
private field z6-1: int
|
||||
static method <clinit>(): void
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getJvmStaticX1-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX1-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX2-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX2-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX3-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX3-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX4-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX4-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX5-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX5-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX6-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticX6-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY1-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY1-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY2-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY2-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY3-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY3-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY4-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY4-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY5-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY5-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY6-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticY6-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ1-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ1-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ2-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ2-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ3-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ3-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ4-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ4-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ5-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ5-1$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ6-0$cp(): int
|
||||
public synthetic final static method access$getJvmStaticZ6-1$cp(): int
|
||||
public synthetic final static method access$getStaticX1-0$cp(): int
|
||||
public synthetic final static method access$getStaticX1-1$cp(): int
|
||||
public synthetic final static method access$getStaticX2-0$cp(): int
|
||||
public synthetic final static method access$getStaticX2-1$cp(): int
|
||||
public synthetic final static method access$getStaticX3-0$cp(): int
|
||||
public synthetic final static method access$getStaticX3-1$cp(): int
|
||||
public synthetic final static method access$getStaticX4-0$cp(): int
|
||||
public synthetic final static method access$getStaticX4-1$cp(): int
|
||||
public synthetic final static method access$getStaticX5-0$cp(): int
|
||||
public synthetic final static method access$getStaticX5-1$cp(): int
|
||||
public synthetic final static method access$getStaticX6-0$cp(): int
|
||||
public synthetic final static method access$getStaticX6-1$cp(): int
|
||||
public synthetic final static method access$getStaticY1-0$cp(): int
|
||||
public synthetic final static method access$getStaticY1-1$cp(): int
|
||||
public synthetic final static method access$getStaticY2-0$cp(): int
|
||||
public synthetic final static method access$getStaticY2-1$cp(): int
|
||||
public synthetic final static method access$getStaticY3-0$cp(): int
|
||||
public synthetic final static method access$getStaticY3-1$cp(): int
|
||||
public synthetic final static method access$getStaticY4-0$cp(): int
|
||||
public synthetic final static method access$getStaticY4-1$cp(): int
|
||||
public synthetic final static method access$getStaticY5-0$cp(): int
|
||||
public synthetic final static method access$getStaticY5-1$cp(): int
|
||||
public synthetic final static method access$getStaticY6-0$cp(): int
|
||||
public synthetic final static method access$getStaticY6-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ1-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ1-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ2-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ2-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ3-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ3-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ4-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ4-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ5-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ5-1$cp(): int
|
||||
public synthetic final static method access$getStaticZ6-0$cp(): int
|
||||
public synthetic final static method access$getStaticZ6-1$cp(): int
|
||||
public synthetic final static method access$setJvmStaticX1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticX1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticX2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticX2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticX6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticX6-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticY6-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setJvmStaticZ6-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticX6-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticY6-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ1-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ1-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ2-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ2-1$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ6-0$cp(p0: int): void
|
||||
public synthetic final static method access$setStaticZ6-1$cp(p0: int): void
|
||||
public final method callAll(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticX1(): Public
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticX2$main(): Public
|
||||
private final static method getJvmStaticX3(): Public
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticX4(): Public
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticX5$main(): Public
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticX6(): Public
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticY1(): Internal
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticY2$main(): Internal
|
||||
private final static method getJvmStaticY3(): Internal
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticY4(): Internal
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticY5$main(): Internal
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticY6(): Internal
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticZ1(): Private
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticZ2$main(): Private
|
||||
private final static method getJvmStaticZ3(): Private
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticZ4(): Private
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticZ5$main(): Private
|
||||
public final static @org.jetbrains.annotations.NotNull method getJvmStaticZ6(): Private
|
||||
public final @org.jetbrains.annotations.NotNull method getX1(): Public
|
||||
public synthetic final method getX1-0(): int
|
||||
public synthetic final method getX1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getX2$main(): Public
|
||||
public synthetic final method getX2-0(): int
|
||||
public synthetic final method getX2-1(): int
|
||||
private final method getX3(): Public
|
||||
public synthetic final method getX3-0(): int
|
||||
public synthetic final method getX3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getX4(): Public
|
||||
public synthetic final method getX4-0(): int
|
||||
public synthetic final method getX4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getX5$main(): Public
|
||||
public synthetic final method getX5-0(): int
|
||||
public synthetic final method getX5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getX6(): Public
|
||||
public synthetic final method getX6-0(): int
|
||||
public synthetic final method getX6-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getY1(): Internal
|
||||
public synthetic final method getY1-0(): int
|
||||
public synthetic final method getY1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getY2$main(): Internal
|
||||
public synthetic final method getY2-0(): int
|
||||
public synthetic final method getY2-1(): int
|
||||
private final method getY3(): Internal
|
||||
public synthetic final method getY3-0(): int
|
||||
public synthetic final method getY3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getY4(): Internal
|
||||
public synthetic final method getY4-0(): int
|
||||
public synthetic final method getY4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getY5$main(): Internal
|
||||
public synthetic final method getY5-0(): int
|
||||
public synthetic final method getY5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getY6(): Internal
|
||||
public synthetic final method getY6-0(): int
|
||||
public synthetic final method getY6-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ1(): Private
|
||||
public synthetic final method getZ1-0(): int
|
||||
public synthetic final method getZ1-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ2$main(): Private
|
||||
public synthetic final method getZ2-0(): int
|
||||
public synthetic final method getZ2-1(): int
|
||||
private final method getZ3(): Private
|
||||
public synthetic final method getZ3-0(): int
|
||||
public synthetic final method getZ3-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ4(): Private
|
||||
public synthetic final method getZ4-0(): int
|
||||
public synthetic final method getZ4-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ5$main(): Private
|
||||
public synthetic final method getZ5-0(): int
|
||||
public synthetic final method getZ5-1(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getZ6(): Private
|
||||
public synthetic final method getZ6-0(): int
|
||||
public synthetic final method getZ6-1(): int
|
||||
public final method setX1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setX2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setX6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setY1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setY2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setY6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setZ1-sUp7gFk(p0: int, p1: int): void
|
||||
public final method setZ2-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final method setZ6-sUp7gFk$main(p0: int, p1: int): void
|
||||
public final inner class Regular$Companion
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class VisibilityKt {
|
||||
// source: 'visibility.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final inner class Regular$Companion
|
||||
}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
// 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 ifExpr() = if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
|
||||
fun whenExpr() = when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
|
||||
fun ifBody() {
|
||||
if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
val x = if (DPoint(0.0, 1.0).x > 0.0) DPoint(2.0, 3.0) else DPoint(4.0, 5.0)
|
||||
}
|
||||
|
||||
fun whenBody() {
|
||||
when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
val x = when {
|
||||
DPoint(6.0, 7.0).x > 0.0 -> DPoint(8.0, 9.0)
|
||||
DPoint(10.0, 11.0).x > 0.0 -> DPoint(12.0, 13.0)
|
||||
else -> DPoint(14.0, 15.0)
|
||||
}
|
||||
}
|
||||
|
||||
// 1 ifExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 0 ifExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 1 whenExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 0 whenExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 0 ifBody.*(\n .*)*(\n .*box-impl.*)
|
||||
// 0 whenBody.*(\n .*)*(\n .*box-impl.*)
|
||||
@@ -1,67 +0,0 @@
|
||||
// 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 require(index: Int, condition: Boolean) = require(condition) { "$index" }
|
||||
|
||||
fun DPoint.toObject() = this as Any
|
||||
fun DPoint.toDPointOrNull() = this as DPoint?
|
||||
fun Nothing?.toDPointOrNull() = this as DPoint?
|
||||
|
||||
// separate to escape from StackOverflow in regex
|
||||
|
||||
fun equalsChecks1(left: DPoint, right: DPoint) {
|
||||
require(100, left == right)
|
||||
}
|
||||
|
||||
fun equalsChecks2(left: DPoint, right: DPoint) {
|
||||
require(101, left.toObject() == right)
|
||||
}
|
||||
fun equalsChecks3(left: DPoint, right: DPoint) {
|
||||
require(102, left == right.toObject())
|
||||
}
|
||||
fun equalsChecks4(left: DPoint, right: DPoint) {
|
||||
require(103, left.toObject() == right.toObject())
|
||||
}
|
||||
fun equalsChecks5(left: DPoint, right: DPoint) {
|
||||
require(104, null == right)
|
||||
}
|
||||
fun equalsChecks6(left: DPoint, right: DPoint) {
|
||||
require(105, left == null)
|
||||
}
|
||||
fun equalsChecks7(left: DPoint, right: DPoint) {
|
||||
require(106, null as Any? == right)
|
||||
}
|
||||
fun equalsChecks8(left: DPoint, right: DPoint) {
|
||||
require(107, left == null as Any?)
|
||||
}
|
||||
fun equalsChecks9(left: DPoint, right: DPoint) {
|
||||
require(108, null.toDPointOrNull() == right)
|
||||
}
|
||||
fun equalsChecks10(left: DPoint, right: DPoint) {
|
||||
require(109, left == null.toDPointOrNull())
|
||||
}
|
||||
fun equalsChecks11(left: DPoint, right: DPoint) {
|
||||
require(110, left.toDPointOrNull() == right)
|
||||
}
|
||||
fun equalsChecks12(left: DPoint, right: DPoint) {
|
||||
require(111, left == right.toDPointOrNull())
|
||||
}
|
||||
|
||||
// 1 BIPUSH 100\n {4}DLOAD 0\n {4}DLOAD 2\n {4}DLOAD 4\n {4}DLOAD 6\n {4}INVOKESTATIC .*equals-impl0.*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 101\n {4}DLOAD 0\n {4}DLOAD 2\n {4}.*toObject.*\n {4}DLOAD 4\n {4}DLOAD 6\n {4}.*box-impl.*\n {4}INVOKESTATIC .*Intrinsics.areEqual.*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 102\n {4}DLOAD 0\n {4}DLOAD 2\n {4}DLOAD 4\n {4}DLOAD 6\n {4}.*toObject.*\n {4}INVOKESTATIC .*equals-impl .*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 103\n {4}DLOAD 0\n {4}DLOAD 2\n {4}.*toObject.*\n {4}DLOAD 4\n {4}DLOAD 6\n {4}.*toObject.*\n {4}INVOKESTATIC .*Intrinsics.areEqual.*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 104\n {4}ICONST_0\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 105\n {4}DLOAD 0\n {4}DLOAD 2\n {4}ACONST_NULL\n {4}INVOKESTATIC .*equals-impl .*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 106\n {4}ACONST_NULL\n {4}DLOAD 4\n {4}DLOAD 6\n {4}.*box.*\n {4}INVOKESTATIC .*Intrinsics.areEqual.*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 107\n {4}DLOAD 0\n {4}DLOAD 2\n {4}ACONST_NULL\n {4}INVOKESTATIC .*equals-impl .*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 108\n {4}ACONST_NULL\n {4}.*toDPointOrNull.*\n {4}ASTORE.*\n {4}ALOAD.*\n {4}DUP\n {4}IFNONNULL.*(\n {3}([^b\n]|b[^o\n]|bo[^x\n]|box-impl-\d)+)*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 109\n {4}DLOAD 0\n {4}DLOAD 2\n {4}ACONST_NULL\n {4}.*toDPointOrNull.*\n {4}INVOKESTATIC .*equals-impl .*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 110\n {4}DLOAD 0\n {4}DLOAD 2\n {4}.*toDPointOrNull.*\n {4}ASTORE.*\n {4}ALOAD.*\n {4}DUP\n {4}IFNONNULL.*(\n {3}([^b\n]|b[^o\n]|bo[^x\n]|box-impl-\d)+)*\n {4}INVOKESTATIC .*require
|
||||
// 1 BIPUSH 111\n {4}DLOAD 0\n {4}DLOAD 2\n {4}DLOAD 4\n {4}DLOAD 6\n {4}.*toDPointOrNull.*\n {4}INVOKESTATIC .*equals-impl .*\n {4}INVOKESTATIC .*require
|
||||
@@ -1,76 +0,0 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class A<T : Any>(val x: List<T>)
|
||||
|
||||
@JvmInline
|
||||
value class B(val x: UInt)
|
||||
|
||||
@JvmInline
|
||||
value class C(val x: Int, val y: B, val z: String = "3")
|
||||
|
||||
@JvmInline
|
||||
value class D(val x: C) {
|
||||
constructor(x: Int, y: UInt, z: Int) : this(C(x, B(y), z.toString()))
|
||||
|
||||
init {
|
||||
println(x.x)
|
||||
}
|
||||
}
|
||||
|
||||
class Regular(private val x: D) {
|
||||
fun privateAccess() {
|
||||
listOf(x.x.x)
|
||||
listOf(x.x)
|
||||
listOf(x)
|
||||
}
|
||||
}
|
||||
|
||||
fun functionWithoutBoxes(x: D, y: D) {
|
||||
var z: D = x
|
||||
val t: D = D(C(1, B(3U), "4"))
|
||||
z = t
|
||||
require(z == y)
|
||||
}
|
||||
|
||||
// 2 public static toString-impl\(IILjava/lang/String;\)Ljava/lang/String;
|
||||
// 2 INVOKESTATIC C.toString-impl \(IILjava/lang/String;\)Ljava/lang/String;
|
||||
// 1 INVOKESTATIC D.toString-impl \(IILjava/lang/String;\)Ljava/lang/String;
|
||||
// 2 public static hashCode-impl\(IILjava/lang/String;\)I
|
||||
// 2 INVOKESTATIC C.hashCode-impl \(IILjava/lang/String;\)I
|
||||
// 1 INVOKESTATIC D.hashCode-impl \(IILjava/lang/String;\)I
|
||||
// 2 public static equals-impl\(IILjava/lang/String;Ljava/lang/Object;\)Z
|
||||
// 2 public final static equals-impl0\(IILjava/lang/String;IILjava/lang/String;\)Z
|
||||
// 1 public final static constructor-impl\(III\)LD;
|
||||
// 2 public final static constructor-impl\(IILjava/lang/String;\)V
|
||||
// 2 INVOKESTATIC D.constructor-impl \(IILjava/lang/String;\)V
|
||||
// 2 INVOKESTATIC C.constructor-impl \(IILjava/lang/String;\)V
|
||||
// 0 public final getX\(\)LC;
|
||||
// 1 public final synthetic unbox-impl-0-0\(\)I
|
||||
// 1 public final synthetic unbox-impl-0-1\(\)I
|
||||
// 1 public final synthetic unbox-impl-0-2\(\)Ljava/lang/String;
|
||||
// 2 private synthetic <init>\(IILjava/lang/String;\)V
|
||||
// 1 public final static synthetic box-impl\(IILjava/lang/String;\)LD;
|
||||
// 1 public final static synthetic box-impl\(IILjava/lang/String;\)LC;
|
||||
// 1 public final synthetic unbox-impl-0\(\)I
|
||||
// 1 public final synthetic unbox-impl-1\(\)I
|
||||
// 1 public final synthetic unbox-impl-2\(\)Ljava/lang/String;
|
||||
// 1 private final I field-0-0\n
|
||||
// 1 private final I field-0-1\n
|
||||
// 1 private final Ljava/lang/String; field-0-2\n
|
||||
// 0 private final LC; (field.*)x\n
|
||||
// 1 private final I x\n
|
||||
// 1 private final I field-0\n
|
||||
// 1 private final I field-1\n
|
||||
// 1 private final Ljava/lang/String; field-2\n
|
||||
// 1 INVOKESPECIAL C.<init> \(IILjava/lang/String;\)V
|
||||
// 1 INVOKESPECIAL D.<init> \(IILjava/lang/String;\)V
|
||||
// 2 INVOKESTATIC D.box-impl \(IILjava/lang/String;\)LD;
|
||||
// 2 INVOKESTATIC C.box-impl \(IILjava/lang/String;\)LC;
|
||||
// 1 public final static functionWithoutBoxes-GPBa7dw\(IILjava/lang/String;IILjava/lang/String;\)V
|
||||
// 0 functionWithoutBoxes.*(\n {3}.*)*(\n {4}(NEW [ABCD]|.*(box|[ABCD]\.<init>|LA;|LB;|LC;|LD;)))
|
||||
// 1 privateAccess.*(\n .+)*(\n GETFIELD Regular\.x-0-0 : I)(\n .+)*(\n INVOKEVIRTUAL Regular\.getX-0 \(\)LC;)(\n .+)*(\n INVOKESPECIAL Regular\.getX \(\)LD;)
|
||||
@@ -1,71 +0,0 @@
|
||||
// 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)
|
||||
|
||||
class Box(var value: DPoint)
|
||||
|
||||
fun supplier(index: Int) {} // to make usage of the argument
|
||||
fun supplier(index: Int, x: DPoint) {} // to make usage of the argument
|
||||
|
||||
fun reassignVariable(x: DPoint, box: Box) {
|
||||
supplier(100)
|
||||
var p = DPoint(1.0, 2.0) // should not use temporary variables
|
||||
supplier(101, p)
|
||||
p = p // should not use temporary variables
|
||||
supplier(102, p)
|
||||
p = DPoint(3.0, 4.0) // should use tempVars
|
||||
supplier(103, p)
|
||||
p = x // should not use temporary variables
|
||||
supplier(104, p)
|
||||
p = box.value // should use temporary variables
|
||||
supplier(105, p)
|
||||
p = listOf(p)[0] // should use temporary variables
|
||||
supplier(106, p)
|
||||
}
|
||||
|
||||
fun reassignField(x: DPoint, box: Box) {
|
||||
supplier(107)
|
||||
val p = DPoint(5.0, 6.0)
|
||||
supplier(108, p)
|
||||
var b = Box(p) // should not use temporary variables
|
||||
supplier(109)
|
||||
b.value = b.value // should not use temporary variables
|
||||
supplier(110)
|
||||
b.value = DPoint(7.0, 8.0) // should use tempVars
|
||||
supplier(111)
|
||||
b.value = x // should not use temporary variables
|
||||
supplier(112)
|
||||
b.value = box.value // should not use temporary variables
|
||||
supplier(113)
|
||||
b.value = listOf(p)[0] // should use temporary variables
|
||||
supplier(114)
|
||||
}
|
||||
|
||||
// 1 100(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){2}101
|
||||
// 0 100(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){3}101
|
||||
// 1 101(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){2}102
|
||||
// 0 101(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){3}102
|
||||
// 1 102(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){4}103
|
||||
// 0 102(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){5}103
|
||||
// 1 103(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){2}104
|
||||
// 0 103(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){3}104
|
||||
// 1 104(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){4}105
|
||||
// 0 104(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){5}105
|
||||
// 1 105(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){4}106
|
||||
// 0 105(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){5}106
|
||||
|
||||
// 1 107(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){2}108
|
||||
// 0 107(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){3}108
|
||||
// 0 108(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){1}109
|
||||
// 0 109(\D|\d\D|\d\d\D)*([DA]STORE(\D|\d\D|\d\d\D)*){1}110
|
||||
// 1 110(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){2}111
|
||||
// 0 110(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){3}111
|
||||
// 0 111(\D|\d\D|\d\d\D)*(DSTORE(\D|\d\D|\d\d\D)*){1}112
|
||||
// 0 112(\D|\d\D|\d\d\D)*([DA]STORE(\D|\d\D|\d\d\D)*){1}113
|
||||
// 1 113(\D|\d\D|\d\d\D)*(ASTORE(\D|\d\D|\d\d\D)*){1}114
|
||||
// 0 113(\D|\d\D|\d\d\D)*(ASTORE(\D|\d\D|\d\d\D)*){2}114
|
||||
@@ -1,49 +0,0 @@
|
||||
// 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 acceptBoxed(x: Any?) {}
|
||||
fun acceptFlattened(x: DPoint) {}
|
||||
fun returnBoxed() = DPoint(3.0, 4.0)
|
||||
|
||||
fun testFlattened2Boxed() {
|
||||
acceptBoxed(DPoint(1.0, 2.0))
|
||||
}
|
||||
|
||||
fun testBoxed2Boxed() {
|
||||
acceptBoxed(returnBoxed())
|
||||
}
|
||||
|
||||
fun testFlattened2Flattened() {
|
||||
acceptFlattened(DPoint(1.0, 2.0))
|
||||
}
|
||||
|
||||
fun testBoxed2Flattened() {
|
||||
acceptFlattened(returnBoxed())
|
||||
}
|
||||
|
||||
fun testIgnoredFlattened() {
|
||||
DPoint(1.0, 2.0)
|
||||
DPoint(1.0, 2.0)
|
||||
}
|
||||
|
||||
fun testIgnoredBoxed() {
|
||||
returnBoxed()
|
||||
}
|
||||
|
||||
// 1 testFlattened2Boxed\(\)V(\n {3}.*)*((\n {3}.*box-impl .*)(\n {3}.*)*){1}
|
||||
// 0 testFlattened2Boxed\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){2}
|
||||
// 0 testBoxed2Boxed\(\)V(\n {3}.*)*((\n {3}.*(box-impl|DSTORE|DLOAD).*)(\n {3}.*)*){1}
|
||||
// 0 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
// 1 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*DSTORE.*)(\n {3}.*)*){2}
|
||||
// 0 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*DSTORE.*)(\n {3}.*)*){3}
|
||||
// 0 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*box-impl .*)(\n {3}.*)*){1}
|
||||
// 1 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*unbox-impl.*)(\n {3}.*)*){2}
|
||||
// 0 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*unbox-impl.*)(\n {3}.*)*){3}
|
||||
// 0 testIgnoredFlattened\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
// 0 testIgnoredBoxed\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
@@ -1,144 +0,0 @@
|
||||
// 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) {
|
||||
val opposite: DPoint
|
||||
get() = DPoint(-x, -y)
|
||||
}
|
||||
|
||||
class DSegment(var p1: DPoint, var p2: DPoint) {
|
||||
|
||||
val center: DPoint
|
||||
get() = DPoint(p1.x / 2 + p2.x / 2, p1.y / 2 + p2.y / 2)
|
||||
|
||||
var notImplemented: DPoint
|
||||
get() = TODO()
|
||||
set(_) = TODO()
|
||||
|
||||
var point1WithBackingFieldAndDefaultGetter: DPoint = p1
|
||||
var point2WithBackingFieldAndDefaultGetter: DPoint = p1
|
||||
get() = field
|
||||
set(value) {
|
||||
field = value
|
||||
require("${2 + 2}" == "4")
|
||||
}
|
||||
|
||||
var pointWithBackingFieldAndCustomGetter: DPoint = p1
|
||||
get() = field.also { require("${2 + 2}" == "4") }
|
||||
set(value) {
|
||||
field = value
|
||||
require("${2 + 2}" == "4")
|
||||
}
|
||||
|
||||
init {
|
||||
p1 = p1
|
||||
}
|
||||
}
|
||||
|
||||
fun tryGetSegment(segment: DSegment) {
|
||||
segment.p1
|
||||
segment.p1.x
|
||||
segment.p1.y
|
||||
segment.p2
|
||||
segment.p2.x
|
||||
segment.p2.y
|
||||
segment.center
|
||||
segment.center.x
|
||||
segment.center.y
|
||||
segment.notImplemented
|
||||
segment.notImplemented.x
|
||||
segment.notImplemented.y
|
||||
segment.point1WithBackingFieldAndDefaultGetter
|
||||
segment.point1WithBackingFieldAndDefaultGetter.x
|
||||
segment.point1WithBackingFieldAndDefaultGetter.y
|
||||
segment.point2WithBackingFieldAndDefaultGetter
|
||||
segment.point2WithBackingFieldAndDefaultGetter.x
|
||||
segment.point2WithBackingFieldAndDefaultGetter.y
|
||||
segment.pointWithBackingFieldAndCustomGetter
|
||||
segment.pointWithBackingFieldAndCustomGetter.x
|
||||
segment.pointWithBackingFieldAndCustomGetter.y
|
||||
}
|
||||
|
||||
fun trySetSegment(segment: DSegment) {
|
||||
segment.notImplemented = segment.p1
|
||||
segment.point1WithBackingFieldAndDefaultGetter = segment.p1
|
||||
segment.point2WithBackingFieldAndDefaultGetter = segment.p1
|
||||
segment.pointWithBackingFieldAndCustomGetter = segment.p1
|
||||
segment.p1 = segment.p1
|
||||
segment.p2 = segment.p2
|
||||
}
|
||||
|
||||
// 0 public final getOpposite\(\)LDPoint;
|
||||
// 1 public final static getOpposite-impl\(DD\)LDPoint;
|
||||
// 1 private D p1-0
|
||||
// 1 private D p1-1
|
||||
// 0 private DPoint; p1
|
||||
// 1 private D p2-0
|
||||
// 1 private D p2-1
|
||||
// 0 private DPoint; p2
|
||||
// 1 private D point1WithBackingFieldAndDefaultGetter-0
|
||||
// 1 private D point1WithBackingFieldAndDefaultGetter-1
|
||||
// 0 private DPoint; point1WithBackingFieldAndDefaultGetter
|
||||
// 1 private D point2WithBackingFieldAndDefaultGetter-0
|
||||
// 1 private D point2WithBackingFieldAndDefaultGetter-1
|
||||
// 0 private DPoint; point2WithBackingFieldAndDefaultGetter
|
||||
// 1 private D pointWithBackingFieldAndCustomGetter-0
|
||||
// 1 private D pointWithBackingFieldAndCustomGetter-1
|
||||
// 0 private DPoint; pointWithBackingFieldAndCustomGetter
|
||||
// 0 private DPoint; notImplemented
|
||||
// 0 private D notImplemented
|
||||
// 0 private DPoint; center
|
||||
// 0 private D center
|
||||
// 1 public <init>\(DDDD\)V
|
||||
// 0 public <init>\(DDDD\)V.*(\n {3}.*)*(\n {4}.*box)
|
||||
// 1 public final getP1\(\)LDPoint;
|
||||
// 1 public final setP1-sUp7gFk\(DD\)V
|
||||
// 1 public final getP2\(\)LDPoint;
|
||||
// 1 public final setP2-sUp7gFk\(DD\)V
|
||||
// 1 public final getCenter\(\)LDPoint;
|
||||
// 1 public final getNotImplemented\(\)LDPoint;
|
||||
// 1 public final setNotImplemented-sUp7gFk\(DD\)V
|
||||
// 1 public final getPoint1WithBackingFieldAndDefaultGetter\(\)LDPoint;
|
||||
// 1 public final setPoint1WithBackingFieldAndDefaultGetter-sUp7gFk\(DD\)V
|
||||
// 1 public final getPoint2WithBackingFieldAndDefaultGetter\(\)LDPoint;
|
||||
// 1 public final setPoint2WithBackingFieldAndDefaultGetter-sUp7gFk\(DD\)V
|
||||
// 1 public final getPointWithBackingFieldAndCustomGetter\(\)LDPoint;
|
||||
// 1 public final setPointWithBackingFieldAndCustomGetter-sUp7gFk\(DD\)V
|
||||
// 1 public final synthetic getP1-0\(\)D
|
||||
// 1 public final synthetic getP1-1\(\)D
|
||||
// 1 public final synthetic getP2-0\(\)D
|
||||
// 1 public final synthetic getP2-1\(\)D
|
||||
// 1 public final synthetic getPoint1WithBackingFieldAndDefaultGetter-0\(\)D
|
||||
// 1 public final synthetic getPoint1WithBackingFieldAndDefaultGetter-1\(\)D
|
||||
// 1 public final synthetic getPoint2WithBackingFieldAndDefaultGetter-0\(\)D
|
||||
// 1 public final synthetic getPoint2WithBackingFieldAndDefaultGetter-1\(\)D
|
||||
// 0 public final getCenter\$
|
||||
// 0 public final getNotImplemented\$
|
||||
// 0 public final getPointWithBackingFieldAndCustomGetter\$
|
||||
// 0 ^ {2}\b.*get.*\$.*(\n {3}.*)*(\n {4}.*\.box)
|
||||
// 1 tryGetSegment\(LDSegment;\)V
|
||||
// 0 try[GS]etSegment\(LDSegment;\)V.*(\n {3}.*)*(\n {4}.*\.box)
|
||||
// 1 tryGetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}.*LDPoint;)){7}
|
||||
// 0 tryGetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}.*LDPoint;)){8}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*(\n {3}.*)*(\n {4}.*LDPoint;)
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setNotImplemented-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setNotImplemented-sUp7gFk \(DD\)V)){2}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPoint1WithBackingFieldAndDefaultGetter-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPoint1WithBackingFieldAndDefaultGetter-sUp7gFk \(DD\)V)){2}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPoint2WithBackingFieldAndDefaultGetter-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPoint2WithBackingFieldAndDefaultGetter-sUp7gFk \(DD\)V)){2}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPointWithBackingFieldAndCustomGetter-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setPointWithBackingFieldAndCustomGetter-sUp7gFk \(DD\)V)){2}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setP1-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setP1-sUp7gFk \(DD\)V)){2}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setP2-sUp7gFk \(DD\)V)){1}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*(\n {4}INVOKEVIRTUAL DSegment\.setP2-sUp7gFk \(DD\)V)){2}
|
||||
// 0 try[GS]etSegment\(LDSegment;\)V.*(\n {3}.*)*(\n {4}INVOKEVIRTUAL DPoint\.get[XY] \(\)D)
|
||||
// 1 tryGetSegment\(LDSegment;\)V.*((\n {3}.*)*?(\n {4}INVOKEVIRTUAL DSegment\.get.*-[01] \(\)D)){14}
|
||||
// 0 tryGetSegment\(LDSegment;\)V.*((\n {3}.*)*?(\n {4}INVOKEVIRTUAL DSegment\.get.*-[01] \(\)D)){15}
|
||||
// 1 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*?(\n {4}INVOKEVIRTUAL DSegment\.get.*-[01] \(\)D)){12}
|
||||
// 0 trySetSegment\(LDSegment;\)V.*((\n {3}.*)*?(\n {4}INVOKEVIRTUAL DSegment\.get.*-[01] \(\)D)){13}
|
||||
@@ -1,38 +0,0 @@
|
||||
// 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 tryExpr() = try {
|
||||
DPoint(0.0, 1.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(2.0, 3.0)
|
||||
} finally {
|
||||
DPoint(4.0, 5.0)
|
||||
}
|
||||
|
||||
fun tryBody() {
|
||||
try {
|
||||
DPoint(0.0, 1.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(2.0, 3.0)
|
||||
} finally {
|
||||
DPoint(4.0, 5.0)
|
||||
}
|
||||
val x: DPoint = try {
|
||||
DPoint(0.0, 1.0)
|
||||
} catch(_: Throwable) {
|
||||
DPoint(2.0, 3.0)
|
||||
} finally {
|
||||
DPoint(4.0, 5.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 1 tryExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 0 tryExpr.*(\n .*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)(\n .*)*(\n .*box-impl.*)
|
||||
// 0 tryBody.*(\n .*)*(\n .*box-impl.*)
|
||||
Reference in New Issue
Block a user