Deprecate escaped modifiers and unescaped annotations

This commit is contained in:
Denis Zharkov
2015-09-08 12:11:30 +03:00
parent 25cd9de71a
commit 676ca86ea4
184 changed files with 979 additions and 787 deletions
+9 -9
View File
@@ -4,27 +4,27 @@ import kotlin.jvm.JvmStatic
class A {
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">JvmStatic</error>
companion object {
JvmStatic fun a1() {
@JvmStatic fun a1() {
}
}
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">JvmStatic</error>
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">@JvmStatic</error>
object A {
JvmStatic fun a2() {
@JvmStatic fun a2() {
}
}
fun test() {
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
<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="[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="[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="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'JvmStatic'">@JvmStatic fun a4()</error> {
}
}
@@ -32,26 +32,26 @@ class A {
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'interface'">JvmStatic</error>
interface B {
companion object {
<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> {
<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 {
JvmStatic fun a2() {
@JvmStatic fun a2() {
}
}
fun test() {
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
<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="[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="[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="[JVM_STATIC_NOT_IN_OBJECT] Only functions in named objects and companion objects of classes can be annotated with 'JvmStatic'">@JvmStatic fun a4()</error> {
}
}