[FIR] Fix lambda resolve in independent context

This commit is contained in:
Mikhail Glukhikh
2020-02-04 10:14:34 +03:00
parent 4f8d0382f7
commit 64c7ab1302
19 changed files with 75 additions and 62 deletions
@@ -10,7 +10,7 @@ fun test() {
val y: Unit = if (false);
foo(y)
foo(<!UNRESOLVED_REFERENCE!>{if (1==1);}()<!>)
foo({if (1==1);}())
return if (true);
}
@@ -9,22 +9,22 @@ fun example() {
val e = if (true) {} else false
val f = if (true) true else {}
<!UNRESOLVED_REFERENCE!>{
{
if (true) true
}()<!>;
}();
<!UNRESOLVED_REFERENCE!>{
{
if (true) true else false
}()<!>;
}();
<!UNRESOLVED_REFERENCE!>{
{
if (true) {} else false
}()<!>;
}();
<!UNRESOLVED_REFERENCE!>{
{
if (true) true else {}
}()<!>
}()
fun t(): Boolean {
return if (true) true
@@ -10,9 +10,9 @@ fun testAnnotatedLambdaLabel() = lambda@ @Ann {}
fun testParenthesizedLambdaLabel() = lambda@ ( {} )
fun testLabelBoundToInvokeOperatorExpression() = l@ <!UNRESOLVED_REFERENCE!>{ 42 }()<!>
fun testLabelBoundToInvokeOperatorExpression() = l@ { 42 }()
fun testLabelBoundToLambda() = <!UNRESOLVED_REFERENCE!>(l@ { 42 })()<!>
fun testLabelBoundToLambda() = (l@ { 42 })()
fun testWhileLoopLabel() {
L@ while (true) {}