FIR: rename EXPRESSION_REQUIRED to EXPRESSION_EXPECTED

This commit is contained in:
Mikhail Glukhikh
2021-04-16 10:23:54 +03:00
parent 26ea0be635
commit 9894b97058
17 changed files with 38 additions and 40 deletions
@@ -1,5 +1,5 @@
fun foo1() = <!EXPRESSION_REQUIRED!>while (b()) {}<!>
fun foo1() = <!EXPRESSION_EXPECTED!>while (b()) {}<!>
fun foo2() = <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>for (i in 10) {}<!>
@@ -15,7 +15,7 @@ fun main() {
}
//KT-351 Distinguish statement and expression positions
val w = <!EXPRESSION_REQUIRED!>while (true) {}<!>
val w = <!EXPRESSION_EXPECTED!>while (true) {}<!>
fun foo() {
var z = 2
@@ -149,12 +149,12 @@ fun bar(a: Unit) {}
fun testStatementInExpressionContext() {
var z = 34
val a1: Unit = <!EXPRESSION_REQUIRED!>z = 334<!>
val a1: Unit = <!EXPRESSION_EXPECTED!>z = 334<!>
val f = for (i in 1..10) {}
if (true) return <!EXPRESSION_REQUIRED!>z = 34<!>
return <!EXPRESSION_REQUIRED!>while (true) {}<!>
if (true) return <!EXPRESSION_EXPECTED!>z = 34<!>
return <!EXPRESSION_EXPECTED!>while (true) {}<!>
}
fun testStatementInExpressionContext2() {
val a2: Unit = <!EXPRESSION_REQUIRED!>while(true) {}<!>
val a2: Unit = <!EXPRESSION_EXPECTED!>while(true) {}<!>
}