mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
rename platformStatic to jvmStatic
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.jvm.jvmStatic
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class testAnnotation
|
||||
|
||||
@@ -7,14 +7,14 @@ class A {
|
||||
companion object {
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic testAnnotation fun test1() = b
|
||||
jvmStatic testAnnotation fun test1() = b
|
||||
}
|
||||
}
|
||||
|
||||
object B {
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic testAnnotation fun test1() = b
|
||||
jvmStatic testAnnotation fun test1() = b
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.jvm.jvmStatic
|
||||
|
||||
class A {
|
||||
|
||||
companion object {
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic val c: String = "OK"
|
||||
jvmStatic val c: String = "OK"
|
||||
|
||||
platformStatic fun test1() = b
|
||||
jvmStatic fun test1() = b
|
||||
|
||||
platformStatic fun test2() = b
|
||||
jvmStatic fun test2() = b
|
||||
|
||||
platformStatic fun String.test3() = this + b
|
||||
jvmStatic fun String.test3() = this + b
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.jvm.jvmStatic
|
||||
|
||||
enum class A {
|
||||
;
|
||||
companion object {
|
||||
val foo: String = "OK"
|
||||
|
||||
platformStatic val bar: String = "OK"
|
||||
jvmStatic val bar: String = "OK"
|
||||
|
||||
platformStatic fun baz() = foo
|
||||
jvmStatic fun baz() = foo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.jvm.jvmStatic
|
||||
|
||||
object A {
|
||||
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic val c: String = "OK"
|
||||
jvmStatic val c: String = "OK"
|
||||
|
||||
platformStatic fun test1() = b
|
||||
jvmStatic fun test1() = b
|
||||
|
||||
platformStatic fun test2() = b
|
||||
jvmStatic fun test2() = b
|
||||
|
||||
platformStatic fun String.test3() = this + b
|
||||
jvmStatic fun String.test3() = this + b
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user