[FIR] Introduce NOT_AN_ANNOTATION_CLASS diagnostic

This commit is contained in:
Mikhail Glukhikh
2020-08-03 11:25:20 +03:00
parent 8fd087a964
commit 2e2099afae
11 changed files with 40 additions and 42 deletions
@@ -1,6 +1,6 @@
// !WITH_NEW_INFERENCE
import java.util.ArrayList
@ArrayList<Int>(1, 1) fun b() {}
<!NOT_AN_ANNOTATION_CLASS!>@ArrayList<Int>(1, 1)<!> fun b() {}
@<!UNRESOLVED_REFERENCE!>Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
<!INAPPLICABLE_CANDIDATE!>@java.lang.Deprecated(<!UNRESOLVED_REFERENCE!>x<!>)<!> fun a() {}
@@ -1,19 +0,0 @@
// FILE: a.kt
annotation class annotation
// FILE: test/b.kt
package test
@test.annotation class annotation
// FILE: other/c.kt
package other
annotation class My
@test.annotation class Your
@My class Our
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: a.kt
annotation class annotation
@@ -1,3 +0,0 @@
class Foo
@Foo class Bar
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Foo
<!NOT_AN_ANNOTATION_CLASS!>@Foo<!> class Bar
@@ -1,2 +1,2 @@
// Class constructor parameter CAN be recursively annotated
class RecursivelyAnnotated(@RecursivelyAnnotated(1) val x: Int)
class RecursivelyAnnotated(<!NOT_AN_ANNOTATION_CLASS, NOT_AN_ANNOTATION_CLASS!>@RecursivelyAnnotated(1)<!> val x: Int)