Surround with try/catch should generate more Kotlin-style code (KT-5435)

#KT-5435 Fixed
This commit is contained in:
shiraji
2016-10-09 12:10:45 +03:00
committed by Nikolay Krasko
parent c7c51a3d6b
commit 06dad5f45b
19 changed files with 97 additions and 57 deletions
@@ -3,9 +3,9 @@ fun foo() {
fun test() {}
}
val d: A
val d: A =
if (<caret>) {
d = A()
A()
}
d.test()
@@ -1,9 +1,8 @@
fun foo() {
val a: String
val b: String
if (<caret>) {
val b = if (<caret>) {
a = "aaa"
b = a
a
}
a.charAt(1)