Replace fold/unfold intentions with a set of specialized ones
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
if (n == 1) {
|
||||
<caret>res = if (3 > 2) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"???"
|
||||
}
|
||||
} else if (n == 2) {
|
||||
println("***")
|
||||
res = "two"
|
||||
} else {
|
||||
println("***")
|
||||
res = "too many"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
if (n == 1) {
|
||||
<caret>if (3 > 2) {
|
||||
println("***")
|
||||
res = "one"
|
||||
} else {
|
||||
println("***")
|
||||
res = "???"
|
||||
}
|
||||
} else if (n == 2) {
|
||||
println("***")
|
||||
res = "two"
|
||||
} else {
|
||||
println("***")
|
||||
res = "too many"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>res = if (n == 1) {
|
||||
if (3 > 2) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"???"
|
||||
}
|
||||
} else if (n == 2) {
|
||||
println("***")
|
||||
"two"
|
||||
} else {
|
||||
println("***")
|
||||
"too many"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>if (n == 1) {
|
||||
res = if (3 > 2) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"???"
|
||||
}
|
||||
} else res = if (n == 2) {
|
||||
println("***")
|
||||
"two"
|
||||
} else {
|
||||
println("***")
|
||||
"too many"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>res = if (n == 1) "one" else "two"
|
||||
|
||||
return res
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>if (n == 1) res = "one" else res = "two"
|
||||
|
||||
return res
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String = "!"
|
||||
|
||||
<caret>res += if (n == 1) "one" else "two"
|
||||
|
||||
return res
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String = "!"
|
||||
|
||||
<caret>if (n == 1) res += "one" else res += "two"
|
||||
|
||||
return res
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>res = if (n == 1) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"two"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>if (n == 1) {
|
||||
println("***")
|
||||
res = "one"
|
||||
} else {
|
||||
println("***")
|
||||
res = "two"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>if (n == 1) {
|
||||
"one"
|
||||
} else {
|
||||
"two"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user