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,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = ok()
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Long) {
@JvmInline
value class R(private val r: Long) {
fun test() = ok()
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Composed(val s: String) {
@JvmInline
value class Composed(val s: String) {
private constructor(s1: String, s2: String) : this(s1 + s2)
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Composed(val s: String) {
@JvmInline
value class Composed(val s: String) {
constructor(s: String, x: Int) : this(s.subSequence(0, x).toString())
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
private fun ok() = "OK"
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Long) {
@JvmInline
value class R(private val r: Long) {
private fun ok() = "OK"
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = run { ok() }
private fun ok() = "OK"
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Long) {
@JvmInline
value class R(private val r: Long) {
fun test() = run { ok() }
private fun ok() = "OK"
@@ -1,8 +1,9 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
fun <T> eval(fn: () -> T) = fn()
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = eval { ok() }
private fun ok() = "OK"
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Long) {
@JvmInline
value class R(private val r: Long) {
fun test() = { ok() }()
private fun ok() = "OK"
@@ -1,8 +1,8 @@
// !LANGUAGE: +InlineClasses
// TARGET_BACKEND: JVM
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = ok()
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = { ok() }()
fun ok() = "OK"
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Long) {
@JvmInline
value class R(private val r: Long) {
fun test() = { ok() }()
fun ok() = "OK"
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = object {
override fun toString() = ok()
}.toString()
@@ -1,8 +1,9 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline fun runInline(fn: () -> String) = fn()
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = runInline { "OK" }
}
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Direction(private val direction: Int) {
@JvmInline
value class Direction(private val direction: Int) {
fun dx() = dx[direction]
fun dy() = dy[direction]
@@ -1,7 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class A(val b: String) {
@JvmInline
value class A(val b: String) {
override fun toString(): String =
buildString { append(b) }
}
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Test(val x: Int) {
@JvmInline
value class Test(val x: Int) {
private companion object {
private const val CONSTANT = "OK"
}
@@ -1,8 +1,9 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
fun <T> eval(fn: () -> T) = fn()
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = eval { "OK" }
}
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() =
object {
override fun toString() = "OK"
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = pf()
companion object {
@@ -1,6 +1,7 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class R(private val r: Int) {
@JvmInline
value class R(private val r: Int) {
fun test() = pv
companion object {