06811dfc2f
This fixes processing of annotations on enum entries. Before, the check in BodyResolveContext.forAnnotation would set the tower data mode to CLASS_HEADER_ANNOTATIONS because no containers were present. This would lead to some tower data elements like nested classifiers missing, which would lead to false positive unresolved references. #KT-63761 Fixed
38 lines
775 B
Kotlin
Vendored
38 lines
775 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
import kotlin.reflect.KClass
|
|
|
|
@Target(
|
|
AnnotationTarget.CLASS,
|
|
AnnotationTarget.TYPE_PARAMETER,
|
|
AnnotationTarget.TYPE,
|
|
AnnotationTarget.PROPERTY,
|
|
AnnotationTarget.FUNCTION,
|
|
AnnotationTarget.CONSTRUCTOR
|
|
)
|
|
annotation class Special(val why: KClass<*>)
|
|
|
|
interface Interface
|
|
|
|
class Outer @Special(Nested::class) constructor(
|
|
@Special(Nested::class)
|
|
val why: KClass<*>
|
|
) {
|
|
@Special(Nested::class)
|
|
class Nested<@Special(Nested::class) T> : @Special(Nested::class) Interface
|
|
|
|
@Special(Nested::class)
|
|
val why2: KClass<*>? = null
|
|
|
|
@Special(Nested::class)
|
|
fun why3() {}
|
|
}
|
|
|
|
enum class E(
|
|
@Special(Nested::class)
|
|
val why: KClass<*>
|
|
) {
|
|
@Special(Nested::class)
|
|
Foo(Nested::class);
|
|
|
|
class Nested
|
|
} |