Fix two psi checker tests (related to annotation diagnostic / parsing)

This commit is contained in:
Mikhail Glukhikh
2018-01-30 15:41:06 +03:00
parent 86f25bff63
commit f46fa263ef
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -17,13 +17,13 @@ class A {
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_OR_CLASS_COMPANION] Only members 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_OR_CLASS_COMPANION] Only members in named objects and companion objects of classes can be annotated with '@JvmStatic'">@JvmStatic fun a4()</error> {
}
}
@@ -31,7 +31,7 @@ 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_OR_CLASS_COMPANION] Only members in named objects and companion objects of classes can be annotated with '@JvmStatic'">@JvmStatic fun a1()</error> {
}
}
@@ -44,13 +44,13 @@ interface B {
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_OR_CLASS_COMPANION] Only members 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_OR_CLASS_COMPANION] Only members in named objects and companion objects of classes can be annotated with '@JvmStatic'">@JvmStatic fun a4()</error> {
}
}
@@ -21,4 +21,4 @@ object<error> </error>{
enum class<error> </error>{}
annotation class<error> </error><error>{}</error>
annotation class<error> </error>{}