[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements

in lambda functions, ^KT-59907 Fixed
This commit is contained in:
Ivan Kochurkin
2023-09-19 13:58:31 +02:00
committed by Space Team
parent 2e4d486131
commit 8e72f60996
9 changed files with 37 additions and 21 deletions
@@ -32,9 +32,9 @@ fun foo() {
// Doesn't work both in K1 and K2, but probably should (KT-58232 for tracking)
val dates3 = <!NEW_INFERENCE_ERROR!>myRun {
when {
else -> return@myRun buildList {
else -> return@myRun <!RETURN_TYPE_MISMATCH!>buildList {
add(4)
}
}<!>
}
}<!>
}