Files
kotlin-fork/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/lambdaAsSAMInterfaceWithAnnotation.kt
T
Dmitrii Gridin 8dacd41818 [LL FIR] introduce lazy resolve tests for type annotations
From one side to check how annotation propagation works and from another
side to cover scenarios with lazy resolution from type position as it is
a valid case of usage in Analysis API (KtFirAnnotationListForType)

^KT-63042
2023-11-23 15:55:06 +00:00

19 lines
356 B
Kotlin
Vendored

package foo
class Arg
@Target(AnnotationTarget.TYPE)
annotation class Anno(val position: String)
const val constant = 0
fun interface Foo {
fun foo(a: @Anno("foo param type $constant") Arg): @Anno("foo return type $constant") Arg
}
fun testMe(f: @Anno("testMe param type $constant") Foo) {}
<expr>
fun resolveMe() {
testMe { b -> b }
}
</expr>