Regenerate inline class tests as 1 arg value classes

This commit is contained in:
Evgeniy.Zhelenskiy
2021-12-14 19:43:05 +03:00
committed by Space
parent 5ac4722be4
commit ec2e96f3e4
398 changed files with 9654 additions and 3771 deletions
@@ -1,7 +1,8 @@
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
OPTIONAL_JVM_INLINE_ANNOTATION
value class InlinedComparable(val x: Int) : Comparable<InlinedComparable> {
override fun compareTo(other: InlinedComparable): Int {
return x.compareTo(other.x)
@@ -14,8 +15,7 @@ interface Base<T> {
fun Base<T>.foo(a: Base<T>, b: T): Base<T>
}
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
OPTIONAL_JVM_INLINE_ANNOTATION
value class InlinedBase(val x: Int) : Base<InlinedBase> {
override fun Base<InlinedBase>.foo(a: Base<InlinedBase>, b: InlinedBase): Base<InlinedBase> {
return if (a is InlinedBase) InlinedBase(a.x + b.x) else this