mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
Implement Unwrap/Remove for conditionals and loops
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
var m = n
|
||||
<caret>do {
|
||||
m--
|
||||
println(m)
|
||||
} while (m > 0)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
var m = n
|
||||
<caret>m--
|
||||
println(m)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
<caret>for (k in 0..n) {
|
||||
println(k)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
<caret>println(k)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
var m = n
|
||||
<caret>while (m > 0) {
|
||||
m--
|
||||
println(m)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// OPTION: 1
|
||||
fun foo(n: Int) {
|
||||
var m = n
|
||||
<caret>m--
|
||||
println(m)
|
||||
}
|
||||
Reference in New Issue
Block a user