[FE 1.0] Report WRONG_ANNOTATION_TARGET on annotations on type arguments
^KT-47772 Fixed
This commit is contained in:
committed by
teamcityserver
parent
046d886850
commit
c304363aea
@@ -0,0 +1,19 @@
|
||||
// FIR_IDENTICAL
|
||||
// LANGUAGE: +ProperCheckAnnotationsTargetInTypeUsePositions
|
||||
// ISSUE: KT-47772
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class Bad
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Good
|
||||
|
||||
fun <K> materialize(): K? = null
|
||||
|
||||
fun test_error() {
|
||||
materialize<<!WRONG_ANNOTATION_TARGET!>@Bad<!> String>()
|
||||
}
|
||||
|
||||
fun test_ok() {
|
||||
materialize<@Good String>()
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> materialize(): K?
|
||||
public fun test_error(): kotlin.Unit
|
||||
public fun test_ok(): kotlin.Unit
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) public final annotation class Bad : kotlin.Annotation {
|
||||
public constructor Bad()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Good : kotlin.Annotation {
|
||||
public constructor Good()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user