fixed bug: 'isStatement' for function body == 'hasBlockBody'
not vice versa
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
|
||||
fun foo1() = <!EXPRESSION_EXPECTED!>while (b()) {}<!>
|
||||
|
||||
fun foo2() = <!EXPRESSION_EXPECTED!>for (<!UNUSED_PARAMETER!>i<!> in <!ITERATOR_MISSING!>10<!>) {}<!>
|
||||
|
||||
fun foo3() = when (b()) {
|
||||
true -> 1
|
||||
else -> 0
|
||||
}
|
||||
|
||||
fun b(): Boolean = true
|
||||
+2
-2
@@ -42,8 +42,8 @@ fun box() : Int {
|
||||
|
||||
//More tests
|
||||
|
||||
fun test1() = while(true) {}
|
||||
fun test2(): Unit = while(true) {}
|
||||
fun test1() { while(true) {} }
|
||||
fun test2(): Unit { while(true) {} }
|
||||
|
||||
fun testCoercionToUnit() {
|
||||
val <!UNUSED_VARIABLE!>simple<!>: ()-> Unit = {
|
||||
|
||||
Reference in New Issue
Block a user