mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
20 lines
428 B
Kotlin
Vendored
20 lines
428 B
Kotlin
Vendored
@Target(AnnotationTarget.CLASS)
|
|
annotation class ClsAnn
|
|
|
|
@Target(AnnotationTarget.FUNCTION)
|
|
annotation class FunAnn
|
|
|
|
@Target(AnnotationTarget.EXPRESSION)
|
|
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
|
|
// TODO: KT-9320: ClsAnn does not appear in bytecode
|
|
return (@ClsAnn object: My() {})
|
|
} |