Implement "Surround with try/catch(/finally)" and "Surround with if/else" for expressions

Fixes #KT-14175
Fixes #KT-19782
This commit is contained in:
Kirill Rakhman
2017-09-11 20:12:08 +02:00
committed by Nikolay Krasko
parent e16d16fdb7
commit 08103d1cb4
32 changed files with 490 additions and 11 deletions
@@ -0,0 +1,7 @@
// IS_APPLICABLE: false
fun foo() {
fun call() {}
<selection>call()</selection>
}
@@ -0,0 +1,3 @@
fun foo() {
<selection>"aaa"</selection> + 1
}
@@ -0,0 +1,3 @@
fun foo() {
(if (<selection></selection>) "aaa" else) + 1
}
@@ -0,0 +1,3 @@
fun foo() {
val a = <selection>"aaa"</selection>
}
@@ -0,0 +1,3 @@
fun foo() {
val a = if (<selection></selection>) "aaa" else
}