rename platformStatic to jvmStatic
This commit is contained in:
+13
-13
@@ -1,57 +1,57 @@
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.jvm.jvmStatic
|
||||
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'class'">platformStatic</error>
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'class'">jvmStatic</error>
|
||||
class A {
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">platformStatic</error>
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">jvmStatic</error>
|
||||
companion object {
|
||||
platformStatic fun a1() {
|
||||
jvmStatic fun a1() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">platformStatic</error>
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">jvmStatic</error>
|
||||
object A {
|
||||
platformStatic fun a2() {
|
||||
jvmStatic fun a2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
|
||||
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
|
||||
<error descr="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'jvmStatic'">jvmStatic fun a3()</error> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
|
||||
<error descr="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'jvmStatic'">jvmStatic fun a4()</error> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'interface'">platformStatic</error>
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'interface'">jvmStatic</error>
|
||||
interface B {
|
||||
companion object {
|
||||
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'platformStatic'">platformStatic fun a1()</error> {
|
||||
<error descr="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'jvmStatic'">jvmStatic fun a1()</error> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
object A {
|
||||
platformStatic fun a2() {
|
||||
jvmStatic fun a2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
|
||||
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
|
||||
<error descr="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'jvmStatic'">jvmStatic fun a3()</error> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
|
||||
<error descr="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'jvmStatic'">jvmStatic fun a4()</error> {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package to
|
||||
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public object JavaClass {
|
||||
platformStatic public fun main(args: Array<String>) {
|
||||
jvmStatic public fun main(args: Array<String>) {
|
||||
println("Hello, world!")
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
abstract class A {
|
||||
// INFO: {"checked": "true"}
|
||||
var x = 2 * 3
|
||||
@@ -23,7 +21,7 @@ abstract class A {
|
||||
var X = "1" + "2"
|
||||
|
||||
// INFO: {"checked": "true"}
|
||||
platformStatic fun foo2(n: Int): String {
|
||||
jvmStatic fun foo2(n: Int): String {
|
||||
return "_" + n + "_"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
abstract class A {
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
var x = 2 * 3
|
||||
@@ -21,7 +19,7 @@ abstract class A {
|
||||
var X = "1" + "2"
|
||||
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
platformStatic fun foo2(n: Int): String {
|
||||
jvmStatic fun foo2(n: Int): String {
|
||||
return "_" + n + "_"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
interface A {
|
||||
// INFO: {"checked": "true"}
|
||||
class Y
|
||||
@@ -17,7 +15,7 @@ interface A {
|
||||
var X = "1" + "2"
|
||||
|
||||
// INFO: {"checked": "true"}
|
||||
platformStatic fun foo2(n: Int): String {
|
||||
jvmStatic fun foo2(n: Int): String {
|
||||
return "_" + n + "_"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
class T {
|
||||
class U {
|
||||
abstract class A {
|
||||
@@ -25,7 +23,7 @@ class T {
|
||||
var X = "1" + "2"
|
||||
|
||||
// INFO: {"checked": "true"}
|
||||
platformStatic fun foo2(n: Int): String {
|
||||
jvmStatic fun foo2(n: Int): String {
|
||||
return "_" + n + "_"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user