Replaced deprecated inline classes with JvmInline value classes in tests
This commit is contained in:
committed by
TeamCityServer
parent
b0aefd543a
commit
1da46586bd
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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())
|
||||
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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()
|
||||
|
||||
Vendored
+3
-2
@@ -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" }
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -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]
|
||||
|
||||
|
||||
+2
-2
@@ -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) }
|
||||
}
|
||||
|
||||
+3
-2
@@ -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"
|
||||
}
|
||||
|
||||
+3
-2
@@ -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" }
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -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"
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
+3
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user