mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
Implement Unwrap/Remove for conditionals and loops
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// OPTION: 3
|
||||
fun foo(n: Int): Int {
|
||||
if (n > 0) {
|
||||
println("> 0")
|
||||
n + 10
|
||||
} <caret>else {
|
||||
println("<= 0")
|
||||
n - 10
|
||||
}
|
||||
|
||||
return n
|
||||
}
|
||||
Reference in New Issue
Block a user