FIR: support annotation resolve & rendering
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package annotations
|
||||
|
||||
@Target(AnnotationTarget.FILE, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.PROPERTY_GETTER)
|
||||
annotation class Simple
|
||||
|
||||
annotation class WithInt(val value: Int)
|
||||
|
||||
annotation class WithString(val s: String)
|
||||
|
||||
annotation class Complex(val wi: WithInt, val ws: WithString)
|
||||
@@ -0,0 +1,28 @@
|
||||
@file:Simple
|
||||
package test
|
||||
|
||||
import annotations.*
|
||||
|
||||
@WithInt(42)
|
||||
abstract class First {
|
||||
@Simple
|
||||
abstract fun foo(@WithString("abc") arg: @Simple Double)
|
||||
|
||||
@Complex(WithInt(7), WithString(""))
|
||||
abstract val v: String
|
||||
}
|
||||
|
||||
@WithString("xyz")
|
||||
class Second(val y: Char) : @WithInt(0) First() {
|
||||
override fun foo(arg: Double) {
|
||||
}
|
||||
|
||||
override val v: String
|
||||
@Simple get() = ""
|
||||
|
||||
@WithString("constructor")
|
||||
constructor(): this('\n')
|
||||
}
|
||||
|
||||
@WithInt(24)
|
||||
typealias Third = @Simple Second
|
||||
@@ -0,0 +1,24 @@
|
||||
FILE: Annotations.kt
|
||||
@FILE:R|annotations/Simple|()
|
||||
@R|annotations/WithInt|(STUB) public? abstract class First() {
|
||||
@R|annotations/Simple|() public? abstract function foo(@WithString(STUB) arg: @R|annotations/Simple|() R|kotlin/Double|): R|error: Not supported: FirImplicitTypeImpl|
|
||||
|
||||
@R|annotations/Complex|(STUB, STUB) public? abstract property v(val): R|kotlin/String|
|
||||
public? get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|annotations/WithString|(STUB) public? final class Second() : @R|annotations/WithInt|(STUB) R|test/First| {
|
||||
public? constructor(y: R|kotlin/Char|): super()
|
||||
|
||||
public? open? override function foo(arg: R|kotlin/Double|): R|error: Not supported: FirImplicitTypeImpl| {
|
||||
}
|
||||
|
||||
public? open? override property v(val): R|kotlin/String|
|
||||
@R|annotations/Simple|() public? get(): R|error: Not supported: FirImplicitTypeImpl| {
|
||||
STUB
|
||||
}
|
||||
|
||||
@R|annotations/WithString|(STUB) public? constructor(): this(STUB)
|
||||
|
||||
}
|
||||
@R|annotations/WithInt|(STUB) @R|annotations/WithInt|(STUB) public? final typealias Third = @R|annotations/Simple|() R|test/Second|
|
||||
Reference in New Issue
Block a user