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() {
val a = <selection>"aaa"</selection>
}
@@ -0,0 +1,7 @@
fun foo() {
val a = try {
"aaa"
} catch (e: <selection>Exception</selection>) {
} finally {
}
}