Force resolve annotations in annotation checker
#KT-46173 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
83bae89ed8
commit
7fb2bf00c5
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +ProperCheckAnnotationsTargetInTypeUsePositions
|
||||
// !DIAGNOSTICS: -USELESS_CAST
|
||||
// ISSUE: KT-46173
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann(val s: String)
|
||||
|
||||
fun some(): Int {
|
||||
return 1 as @Ann(<!ARGUMENT_TYPE_MISMATCH, ARGUMENT_TYPE_MISMATCH!>6<!>) Int // should error but doesn't
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +ProperCheckAnnotationsTargetInTypeUsePositions
|
||||
// !DIAGNOSTICS: -USELESS_CAST
|
||||
// ISSUE: KT-46173
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann(val s: String)
|
||||
|
||||
fun some(): Int {
|
||||
return 1 as @Ann(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>6<!>) Int // should error but doesn't
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public fun some(): kotlin.Int
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ s: kotlin.String)
|
||||
public final val s: kotlin.String
|
||||
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