[FIR] Add saving of local context in anonymous functions for further resolve

#KT-37066 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-03-03 14:52:31 +03:00
parent 8023d04c61
commit 5f9876479e
13 changed files with 106 additions and 36 deletions
@@ -6,14 +6,14 @@ fun testLambda() {
if (x is String) return@myRun { it -> x.length <!AMBIGUITY!>+<!> it }
if (x !is Int) return@myRun { it -> it }
{ it -> <!UNRESOLVED_REFERENCE!>x<!> + it }
{ it -> x <!AMBIGUITY!>+<!> it }
}
val twoLambda: (Int) -> Int = myRun {
val x: Int = 1
run {
val y: Int = 2
{ x <!AMBIGUITY!>+<!> <!UNRESOLVED_REFERENCE!>y<!> }
{ x + y }
}
}