fixed bug: 'isStatement' for function body == 'hasBlockBody'

not vice versa
This commit is contained in:
Svetlana Isakova
2013-09-30 17:24:03 +04:00
parent fa8ca4e781
commit a3f9cef354
9 changed files with 25 additions and 9 deletions
@@ -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
@@ -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 = {