FIR: Analyze return statements for implicit lambda with independent context

This commit is contained in:
Denis.Zharkov
2021-01-13 21:13:48 +03:00
parent 5e83e10a72
commit 0e368cc237
5 changed files with 47 additions and 10 deletions
@@ -3,7 +3,7 @@
fun testLambda() {
val basicTest: (Int) -> Int = myRun {
val x: Any? = null
if (x is String) return@myRun { it -> x.length <!AMBIGUITY!>+<!> it }
if (x is String) return@myRun { it -> x.length + it }
if (x !is Int) return@myRun { it -> it }
{ it -> x + it }