Fix intention descriptions and templates
This commit is contained in:
+6
-10
@@ -1,11 +1,7 @@
|
||||
public class MyClass {
|
||||
public fun f(a: Int): String {
|
||||
var res: String
|
||||
|
||||
res = if (a == 1) "one";
|
||||
else if (a == 2) "two";
|
||||
else "too many";
|
||||
|
||||
return res;
|
||||
}
|
||||
res = if (n == 1) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"two"
|
||||
}
|
||||
+6
-10
@@ -1,11 +1,7 @@
|
||||
public class MyClass {
|
||||
public fun f(a: Int): String {
|
||||
var res: String
|
||||
|
||||
if (a == 1) res = "one";
|
||||
else if (a == 2) res = "two";
|
||||
else res = "too many";
|
||||
|
||||
return res;
|
||||
}
|
||||
if (n == 1) {
|
||||
println("***")
|
||||
res = "one"
|
||||
} else {
|
||||
println("***")
|
||||
res = "two"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts 'if' statement where each branch is terminated with assignment to the same variable
|
||||
into single assignment with 'if' expression
|
||||
This intention converts branched (if/when) expression where each branch is terminated with assignment/return/method call into single
|
||||
assignment/return/method call with branched expression as argument
|
||||
</body>
|
||||
</html>
|
||||
+6
-10
@@ -1,11 +1,7 @@
|
||||
public class MyClass {
|
||||
public fun f(a: Int): String {
|
||||
var res: String
|
||||
|
||||
if (a == 1) res = "one";
|
||||
else if (a == 2) res = "two";
|
||||
else res = "too many";
|
||||
|
||||
return res;
|
||||
}
|
||||
if (n == 1) {
|
||||
println("***")
|
||||
res = "one"
|
||||
} else {
|
||||
println("***")
|
||||
res = "two"
|
||||
}
|
||||
+6
-10
@@ -1,11 +1,7 @@
|
||||
public class MyClass {
|
||||
public fun f(a: Int): String {
|
||||
var res: String
|
||||
|
||||
res = if (a == 1) "one";
|
||||
else if (a == 2) "two";
|
||||
else "too many";
|
||||
|
||||
return res;
|
||||
}
|
||||
res = if (n == 1) {
|
||||
println("***")
|
||||
"one"
|
||||
} else {
|
||||
println("***")
|
||||
"two"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts assignment with 'if' expression as right-hand side
|
||||
into 'if' statement where each branch is terminated with assignment to the original variable
|
||||
This intention converts assignment/return/method call with branched (if/when) expression as argument
|
||||
to branched expression where each branch is terminated with assignment/return/method call
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user