Files
Dmitrii Gridin 33e6a85a2d [LL FIR] rename testdata to testData to avoid copyright generation
We exclude testData pattern from copyright scope
2023-09-18 21:12:45 +00:00

43 lines
629 B
Kotlin
Vendored

// RESOLVE_SCRIPT
class Builder {
var version: String = ""
@Anno(En.Entry)
fun execute() {
println(version)
}
}
enum class En {
Entry
}
@Target(AnnotationTarget.EXPRESSION, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.SOURCE)
annotation class Anno(val s: En)
@Anno(En.Entry)
fun build(action: Builder.() -> Unit) = Builder().apply(action)
@Anno(En.Entry)
build {
version = "123"
class A {
@Anno(En.Entry)
fun doo(i: Int) {
}
}
execute()
}
val builder = build {
version = "321"
}
@Anno(En.Entry)
builder.execute()
builder.version = ""