Replaced deprecated inline classes with JvmInline value classes in tests

This commit is contained in:
zhelenskiy
2021-10-09 02:31:28 +03:00
committed by TeamCityServer
parent b0aefd543a
commit 1da46586bd
386 changed files with 1480 additions and 840 deletions
@@ -1,4 +1,4 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
interface IFoo {
fun getO(): String
@@ -7,7 +7,8 @@ interface IFoo {
val ok: String get() = getO() + k
}
inline class InlineFooImpl(val s: String): IFoo {
@JvmInline
value class InlineFooImpl(val s: String): IFoo {
override fun getO(): String = s
override val k: String get() = "K"
}
@@ -1,6 +1,7 @@
// WITH_RUNTIME
inline class Wrapper(val id: Int)
@JvmInline
value class Wrapper(val id: Int)
class DMap(private val map: Map<Wrapper, String>) :
Map<Wrapper, String> by map
@@ -1,7 +1,8 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
inline class S(val x: String)
@JvmInline
value class S(val x: String)
interface IFoo {
val S.extVal: String
@@ -2,7 +2,8 @@
import kotlin.test.assertEquals
inline class S(val xs: Array<String>)
@JvmInline
value class S(val xs: Array<String>)
interface IFoo {
var S.extVar: String
@@ -5,7 +5,8 @@ interface IFoo {
fun foo(s: String): String
}
inline class Z(val x: Int) : IFoo {
@JvmInline
value class Z(val x: Int) : IFoo {
override fun foo(s: String): String = x.toString() + s
}
@@ -5,7 +5,8 @@ interface IFoo {
fun foo(s: String): String
}
inline class Z(val x: Long) : IFoo {
@JvmInline
value class Z(val x: Long) : IFoo {
override fun foo(s: String): String = x.toString() + s
}
@@ -1,7 +1,8 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
inline class S(val x: String)
@JvmInline
value class S(val x: String)
interface IFoo<T> {
fun memberFun(s1: S, s2: String): String
@@ -12,7 +13,8 @@ interface IFoo<T> {
fun <X> T.genericMemberExtFun(x: X): String
}
inline class FooImpl(val xs: Array<String>) : IFoo<S> {
@JvmInline
value class FooImpl(val xs: Array<String>) : IFoo<S> {
override fun memberFun(s1: S, s2: String): String = xs[0] + s1.x + s2
override fun memberFunT(x1: S, x2: String): String = xs[0] + x1.x + x2
override fun <X> genericMemberFun(x1: S, x2: X): String = xs[0] + x1.x + x2.toString()
@@ -1,7 +1,8 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
inline class S(val x: String)
@JvmInline
value class S(val x: String)
interface IFoo<T> {
fun memberFun(s1: S, s2: String): String