6fdbc38cf1
While this fix only changes label name, it's important for proper lambda resolution because receiver is set for a lambda only in presence of a label This commit fixes a lot of checkType calls in diagnostic tests
25 lines
268 B
Kotlin
Vendored
25 lines
268 B
Kotlin
Vendored
fun test(x: Int): Int {
|
|
x myMap {
|
|
return@myMap
|
|
}
|
|
|
|
return 0
|
|
}
|
|
|
|
fun myMap(x: Int): Int {
|
|
x myMap {
|
|
return@myMap
|
|
}
|
|
|
|
return 0
|
|
}
|
|
|
|
infix fun Int.myMap(x: () -> Unit) {}
|
|
|
|
fun box(): String {
|
|
test(0)
|
|
myMap(0)
|
|
|
|
return "OK"
|
|
}
|