KT-7068 None of the following functions can be called with two functions with extention function parameter
#KT-7068 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun withLambda(block : Int.(String) -> Unit) {
|
||||
}
|
||||
|
||||
fun withLambda(o : Int, block : Int.(String) -> Unit) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
withLambda {
|
||||
it.length()
|
||||
}
|
||||
|
||||
withLambda { r -> // no error should be here
|
||||
r.length()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
internal fun test(): kotlin.Unit
|
||||
internal fun withLambda(/*0*/ o: kotlin.Int, /*1*/ block: kotlin.Int.(kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
internal fun withLambda(/*0*/ block: kotlin.Int.(kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
@@ -0,0 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun withLambda(block : Int.(String) -> Unit) {
|
||||
}
|
||||
|
||||
fun withLambda(block : Int.(String, String) -> Unit) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
withLambda { r ->
|
||||
r.length()
|
||||
}
|
||||
|
||||
withLambda { x, y ->
|
||||
x.length() + y.length()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
internal fun test(): kotlin.Unit
|
||||
internal fun withLambda(/*0*/ block: kotlin.Int.(kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
internal fun withLambda(/*0*/ block: kotlin.Int.(kotlin.String, kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
Reference in New Issue
Block a user