Resolve parenthesized element as expression
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
class C {
|
||||
|
||||
fun f (<warning>a</warning> : Boolean, <warning>b</warning> : Boolean) {
|
||||
@b (while (true)
|
||||
@b (<error descr="[EXPRESSION_EXPECTED] While is not an expression, and only expressions are allowed here">while (true)
|
||||
@a {
|
||||
<error>break@f</error>
|
||||
break
|
||||
<warning>break@b</warning>
|
||||
break@b
|
||||
<error>break@a</error>
|
||||
})
|
||||
}</error>)
|
||||
|
||||
<error>continue</error>
|
||||
|
||||
@b (while (true)
|
||||
@b (<error descr="[EXPRESSION_EXPECTED] While is not an expression, and only expressions are allowed here">while (true)
|
||||
@a {
|
||||
<error>continue@f</error>
|
||||
continue
|
||||
<warning>continue@b</warning>
|
||||
continue@b
|
||||
<error>continue@a</error>
|
||||
})
|
||||
}</error>)
|
||||
|
||||
<error>break</error>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// ERROR: Assignments are not expressions, and only expressions are allowed in this context
|
||||
|
||||
fun foo() {
|
||||
var x = 0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
|
||||
// ERROR: Assignments are not expressions, and only expressions are allowed in this context
|
||||
|
||||
fun foo() {
|
||||
var x = 0
|
||||
|
||||
Reference in New Issue
Block a user