a17ad6bc55
When we have parameters of annotation like
```
// FILE: Anno.kt
package p3
@Target(AnnotationTarget.FUNCTION)
annotation class Anno(vararg val x: String)
// FILE: main.kt
import p3.Anno
@Anno("A", "B")
fun foo(): Int = 10
```
the K2 CodeGen causes an exception reporting the unresolved type
reference. A lazy resolution call fixes the issue.
In addition, FIR for the value parameter to IR conversion fails because
`Fir2IrLazyProperty` for the value parameter tries to resolve the
initializer before creating the `IrParameterSymbol`. When it checks the
`localStorage`, it reports an error for the missing `IrParameterSymbol`.
This commit adds `IrParameterSymbol` before resolving the initializer.
^KT-65099 Fixed
15 lines
211 B
Kotlin
Vendored
15 lines
211 B
Kotlin
Vendored
// FILE: Anno.kt
|
|
package p3
|
|
|
|
@Target(AnnotationTarget.FUNCTION)
|
|
annotation class Anno(vararg val x: String)
|
|
|
|
// FILE: main.kt
|
|
import p3.Anno
|
|
|
|
@Anno("A", "B")
|
|
fun foo(): Int = 10
|
|
|
|
fun test() {
|
|
val x = foo()
|
|
} |