Get rid of deprecated annotations in testData
This commit is contained in:
Vendored
+2
-2
@@ -1,13 +1,13 @@
|
||||
import kotlin.reflect.*
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
|
||||
class A {
|
||||
private var foo: String = ""
|
||||
}
|
||||
|
||||
object O {
|
||||
private static var bar: String = ""
|
||||
private @static var bar: String = ""
|
||||
}
|
||||
|
||||
class CounterTest<T>(t: T) {
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.jvm.isAccessible
|
||||
import kotlin.reflect.KCallable
|
||||
|
||||
@@ -9,9 +9,9 @@ class A(private var bar: String = "") {
|
||||
}
|
||||
|
||||
object O {
|
||||
private static var baz: String = ""
|
||||
private @static var baz: String = ""
|
||||
|
||||
static fun getBaz() = O::baz.apply { isAccessible = true }
|
||||
@static fun getBaz() = O::baz.apply { isAccessible = true }
|
||||
}
|
||||
|
||||
fun check(callable: KCallable<*>, vararg args: Any?) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
|
||||
object Obj {
|
||||
static fun foo() {}
|
||||
@static fun foo() {}
|
||||
}
|
||||
|
||||
class C {
|
||||
companion object {
|
||||
static fun bar() {}
|
||||
@static fun bar() {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
|
||||
object Obj {
|
||||
static fun foo(s: String) {}
|
||||
static fun bar() {}
|
||||
static fun sly(obj: Obj) {}
|
||||
@static fun foo(s: String) {}
|
||||
@static fun bar() {}
|
||||
@static fun sly(obj: Obj) {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -7,7 +7,7 @@ class A {
|
||||
}
|
||||
|
||||
object O {
|
||||
kotlin.platform.platformStatic fun baz() {}
|
||||
@kotlin.platform.platformStatic fun baz() {}
|
||||
}
|
||||
|
||||
fun nullableUnit(unit: Boolean): Unit? = if (unit) Unit else null
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
object Obj {
|
||||
static fun foo(a: String, b: String = "b") = a + b
|
||||
@static fun foo(a: String, b: String = "b") = a + b
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ annotation class Ann(val args: Array<KClass<*>>)
|
||||
class O
|
||||
class K
|
||||
|
||||
Ann(array(O::class, K::class)) class MyClass
|
||||
@Ann(array(O::class, K::class)) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ annotation class Ann(val arg: KClass<*>)
|
||||
|
||||
class OK
|
||||
|
||||
Ann(OK::class) class MyClass
|
||||
@Ann(OK::class) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
val argName = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ annotation class Ann(vararg val args: KClass<*>)
|
||||
class O
|
||||
class K
|
||||
|
||||
Ann(O::class, K::class) class MyClass
|
||||
@Ann(O::class, K::class) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
||||
|
||||
compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.failsWith
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.jvm.javaType
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@@ -7,7 +7,7 @@ class A {
|
||||
}
|
||||
|
||||
object O {
|
||||
static fun bar(a: A): String = ""
|
||||
@static fun bar(a: A): String = ""
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.ParameterizedType
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.*
|
||||
import kotlin.reflect.jvm.javaType
|
||||
import kotlin.test.assertEquals
|
||||
@@ -9,7 +9,7 @@ import kotlin.test.assertEquals
|
||||
class A(private var foo: List<String>)
|
||||
|
||||
object O {
|
||||
private static var bar: List<String> = listOf()
|
||||
private @static var bar: List<String> = listOf()
|
||||
}
|
||||
|
||||
fun topLevel(): List<String> = listOf()
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
import kotlin.reflect.KMutableProperty
|
||||
import kotlin.reflect.jvm.javaType
|
||||
import kotlin.test.assertEquals
|
||||
@@ -6,7 +6,7 @@ import kotlin.test.assertEquals
|
||||
class A(private var foo: String)
|
||||
|
||||
object O {
|
||||
private static var bar: String = ""
|
||||
private @static var bar: String = ""
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
import kotlin.reflect.*
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.platform.platformStatic as static
|
||||
import kotlin.jvm.JvmStatic as static
|
||||
|
||||
object Obj {
|
||||
private static var result: String = "Fail"
|
||||
private @static var result: String = "Fail"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user