FIR: support separate ASSIGNMENT_IN_EXPRESSION_CONTEXT

This commit is contained in:
Mikhail Glukhikh
2021-04-16 11:06:43 +03:00
parent 9894b97058
commit 6b95bcdbdb
7 changed files with 34 additions and 7 deletions
@@ -149,9 +149,9 @@ fun bar(a: Unit) {}
fun testStatementInExpressionContext() {
var z = 34
val a1: Unit = <!EXPRESSION_EXPECTED!>z = 334<!>
val a1: Unit = <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!>z = 334<!>
val f = for (i in 1..10) {}
if (true) return <!EXPRESSION_EXPECTED!>z = 34<!>
if (true) return <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!>z = 34<!>
return <!EXPRESSION_EXPECTED!>while (true) {}<!>
}