Some Live Templates should probably be enabled also for "expressions" not only "statements" (KT-19194)

Consider if-then, if-else, do-while, while positions without block as
statement position.

 #KT-19194 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-01-23 10:11:44 +09:00
committed by Nikolay Krasko
parent 543db380d2
commit c06aaf6128
9 changed files with 56 additions and 7 deletions
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
sou<caret>t
}
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
do sou<caret>t while (b)
}
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
for (i in 1..10) sou<caret>t
}
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
if (b) println() else sou<caret>t
}
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
if (b) sou<caret>t else println()
}
@@ -0,0 +1,6 @@
fun test(b: Boolean) {
when (b) {
true -> sou<caret>t
else -> println()
}
}
@@ -0,0 +1,3 @@
fun test(b: Boolean) {
while (b) sou<caret>t
}