mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
21 lines
436 B
Kotlin
Vendored
21 lines
436 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
@Target(AnnotationTarget.CLASS)
|
|
annotation class ClsAnn
|
|
|
|
@Target(AnnotationTarget.FUNCTION)
|
|
annotation class FunAnn
|
|
|
|
@Target(AnnotationTarget.EXPRESSION)
|
|
@Retention(AnnotationRetention.SOURCE)
|
|
annotation class ExprAnn
|
|
|
|
fun bar(arg: () -> Int) = arg()
|
|
|
|
open class My
|
|
|
|
fun foo(arg: Int): My {
|
|
bar @FunAnn { arg }
|
|
bar @ExprAnn { arg }
|
|
val x = @FunAnn fun() = arg
|
|
return (@ClsAnn object: My() {})
|
|
} |