Implement Unwrap/Remove for conditionals and loops

This commit is contained in:
Alexey Sedunov
2013-06-18 17:21:50 +04:00
parent fa01d59ef8
commit 8964e0e152
28 changed files with 618 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
// OPTION: 1
fun foo(n: Int) {
var m = n
<caret>do {
m--
println(m)
} while (m > 0)
}

View File

@@ -0,0 +1,6 @@
// OPTION: 1
fun foo(n: Int) {
var m = n
<caret>m--
println(m)
}

View File

@@ -0,0 +1,6 @@
// OPTION: 1
fun foo(n: Int) {
<caret>for (k in 0..n) {
println(k)
}
}

View File

@@ -0,0 +1,4 @@
// OPTION: 1
fun foo(n: Int) {
<caret>println(k)
}

View File

@@ -0,0 +1,8 @@
// OPTION: 1
fun foo(n: Int) {
var m = n
<caret>while (m > 0) {
m--
println(m)
}
}

View File

@@ -0,0 +1,6 @@
// OPTION: 1
fun foo(n: Int) {
var m = n
<caret>m--
println(m)
}