[FIR] Deeply copy annotation type ref on COMPILER_REQUIRED_ANNOTATION_PHASE
The original idea was in resolving of annotation type ref using only importing scopes and accepting or discarding that resolution result depending on if this annotation is needed for compiler/plugins or not But there is a problem that resolution of FirUserType with type resolver is not a pure operation: type resolver transforms qualifier parts which may contain type arguments, so if they were unresolved at the first resolve, they will stay unresolved forever. To prevent this we will deeply copy annotation type ref before first resolution ^KT-55286 Fixed
This commit is contained in:
committed by
Space Team
parent
2aad466d00
commit
880b278c40
@@ -6,11 +6,11 @@ FILE: kt55286.kt
|
||||
|
||||
}
|
||||
public open class Base : R|kotlin/Any| {
|
||||
public constructor(@R|Deprecated<ERROR CLASS: Symbol not found for Nested>|() a: R|kotlin/String|): R|Base| {
|
||||
public constructor(@R|Deprecated<Base.Nested>|() a: R|kotlin/String|): R|Base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@R|Deprecated<ERROR CLASS: Symbol not found for Nested>|() public final val a: R|kotlin/String| = R|<local>/a|
|
||||
@R|Deprecated<Base.Nested>|() public final val a: R|kotlin/String| = R|<local>/a|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final class Nested : R|kotlin/Any| {
|
||||
@@ -22,11 +22,11 @@ FILE: kt55286.kt
|
||||
|
||||
}
|
||||
public final class Derived : R|Base| {
|
||||
public constructor(@R|Deprecated<ERROR CLASS: Symbol not found for Nested>|() b: R|kotlin/String|): R|Derived| {
|
||||
public constructor(@R|Deprecated<Base.Nested>|() b: R|kotlin/String|): R|Derived| {
|
||||
super<R|Base|>(String())
|
||||
}
|
||||
|
||||
@R|Deprecated<ERROR CLASS: Symbol not found for Nested>|() public final val b: R|kotlin/String| = R|<local>/b|
|
||||
@R|Deprecated<Base.Nested>|() public final val b: R|kotlin/String| = R|<local>/b|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
annotation class Deprecated<T>
|
||||
|
||||
open class Base(
|
||||
@Deprecated<<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Nested<!>> val a: String,
|
||||
@Deprecated<Nested> val a: String,
|
||||
) {
|
||||
class Nested
|
||||
}
|
||||
|
||||
class Derived(
|
||||
@Deprecated<<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Nested<!>> val b: String,
|
||||
@Deprecated<Nested> val b: String,
|
||||
) : Base("")
|
||||
|
||||
Reference in New Issue
Block a user