[FIR] do not capture class context during class annotations processing
^KT-62587
This commit is contained in:
committed by
Space Team
parent
b03e3f0b0d
commit
dfdd86da1f
+4
-4
@@ -63,11 +63,11 @@ private class FirDeclarationsResolveTransformerForArgumentAnnotations(
|
|||||||
|
|
||||||
override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirRegularClass {
|
override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirRegularClass {
|
||||||
regularClass.transformAnnotations(this, data)
|
regularClass.transformAnnotations(this, data)
|
||||||
|
.transformTypeParameters(transformer, data)
|
||||||
|
.transformSuperTypeRefs(transformer, data)
|
||||||
|
|
||||||
withRegularClass(regularClass) {
|
withRegularClass(regularClass) {
|
||||||
regularClass
|
regularClass.transformDeclarations(transformer, data)
|
||||||
.transformTypeParameters(transformer, data)
|
|
||||||
.transformSuperTypeRefs(transformer, data)
|
|
||||||
.transformDeclarations(transformer, data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return regularClass
|
return regularClass
|
||||||
|
|||||||
Vendored
-13
@@ -1,13 +0,0 @@
|
|||||||
import kotlin.reflect.KClass
|
|
||||||
|
|
||||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE)
|
|
||||||
annotation class Special(val why: KClass<*>)
|
|
||||||
|
|
||||||
interface Interface
|
|
||||||
|
|
||||||
class Outer {
|
|
||||||
@Special(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!><!UNRESOLVED_REFERENCE!>NestedNested<!>::class<!>)
|
|
||||||
class Nested<@Special(NestedNested::class) T> : @Special(NestedNested::class) Interface {
|
|
||||||
class NestedNested
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE)
|
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE)
|
||||||
|
|||||||
Vendored
-16
@@ -1,16 +0,0 @@
|
|||||||
// LL_FIR_DIVERGENCE
|
|
||||||
// KT-62587
|
|
||||||
// LL_FIR_DIVERGENCE
|
|
||||||
import kotlin.reflect.KClass
|
|
||||||
|
|
||||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE)
|
|
||||||
annotation class Special(val why: KClass<*>)
|
|
||||||
|
|
||||||
interface Interface
|
|
||||||
|
|
||||||
class Outer {
|
|
||||||
@Special(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!><!UNRESOLVED_REFERENCE!>NestedNested<!>::class<!>)
|
|
||||||
class Nested<@Special(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!><!UNRESOLVED_REFERENCE!>NestedNested<!>::class<!>) T> : @Special(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!><!UNRESOLVED_REFERENCE!>NestedNested<!>::class<!>) Interface {
|
|
||||||
class NestedNested
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user