Resolve annotations on lambda's descriptor
Also add test checking functional expression
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: () -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") fun() {})
|
||||
}
|
||||
|
||||
//Ann(x = "OK1": kotlin.String) local final fun <no name provided>(): kotlin.Unit defined in box
|
||||
@@ -0,0 +1,9 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: (Int, String) -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") fun(@Ann("1") x: Int, @Ann("2") y: String) {})
|
||||
}
|
||||
|
||||
//Ann(x = "OK1": kotlin.String) local final fun <no name provided>(/*0*/ Ann(x = "1": kotlin.String) x: kotlin.Int, /*1*/ Ann(x = "2": kotlin.String) y: kotlin.String): kotlin.Unit defined in box
|
||||
@@ -0,0 +1,12 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: () -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") { })
|
||||
|
||||
foo() @Ann("OK2") { }
|
||||
}
|
||||
|
||||
//Ann(x = "OK1": kotlin.String) local final fun <anonymous>(): kotlin.Unit defined in box
|
||||
//Ann(x = "OK2": kotlin.String) local final fun <anonymous>(): kotlin.Unit defined in box
|
||||
@@ -0,0 +1,12 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: () -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") label@{ })
|
||||
|
||||
foo() @Ann("OK2") label@{ }
|
||||
}
|
||||
|
||||
//Ann(x = "OK1": kotlin.String) local final fun <anonymous>(): kotlin.Unit defined in box
|
||||
//Ann(x = "OK2": kotlin.String) local final fun <anonymous>(): kotlin.Unit defined in box
|
||||
@@ -0,0 +1,9 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: () -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") (fun() {}))
|
||||
}
|
||||
|
||||
//local final fun <no name provided>(): kotlin.Unit defined in box
|
||||
@@ -0,0 +1,9 @@
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo(block: () -> Unit) = block.javaClass
|
||||
|
||||
fun box() {
|
||||
foo( @Ann("OK1") ({ }))
|
||||
}
|
||||
|
||||
//local final fun <anonymous>(): kotlin.Unit defined in box
|
||||
Reference in New Issue
Block a user