FIR: report WRONG_ANNOTATION_TARGET(_WITH_USE_SITE_TARGET) on declarations
This commit is contained in:
+2
-2
@@ -12,8 +12,8 @@ annotation class Ann2
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Ann3(val arg: Int, val s: String)
|
||||
|
||||
@Ann3(
|
||||
<!WRONG_ANNOTATION_TARGET!>@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann<!> 5, ""
|
||||
)<!> <!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann2<!> 1, ""
|
||||
) val a = 0
|
||||
)<!> val a = 0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Should be something like TYPE_MISMATCH here
|
||||
@file:Some(return x)
|
||||
<!WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@file:Some(return x)<!>
|
||||
|
||||
const val x = 42
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ annotation class MyAnn
|
||||
fun bar(x: Int) {}
|
||||
|
||||
fun foo() {
|
||||
@MyAnn
|
||||
<!WRONG_ANNOTATION_TARGET!>@MyAnn<!>
|
||||
val x: Int
|
||||
@MyAnn
|
||||
x = @MyAnn 42
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: RedundantSetterParameterTypeChecker.kt
|
||||
@R|kotlin/annotation/Target|(vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|)) public final annotation class Ann : R|kotlin/Annotation| {
|
||||
@R|kotlin/annotation/Target|(vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.VALUE_PARAMETER|)) public final annotation class Ann : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantSetterParameterTypeChecker.kt
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class Ann
|
||||
|
||||
<!REDECLARATION!>var x: Int
|
||||
|
||||
@@ -41,6 +41,6 @@ class Second(val y: Char) : @WithInt(0) First() {
|
||||
constructor(): this('\n')
|
||||
}
|
||||
|
||||
@WithInt(24)
|
||||
@VeryComplex(3.14f, 6.67e-11, false, 123456789012345L, null)
|
||||
<!WRONG_ANNOTATION_TARGET!>@WithInt(24)<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>@VeryComplex(3.14f, 6.67e-11, false, 123456789012345L, null)<!>
|
||||
typealias Third = @Simple Second
|
||||
|
||||
Reference in New Issue
Block a user