Surround with try/catch should generate more Kotlin-style code (KT-5435)
#KT-5435 Fixed
This commit is contained in:
+2
-2
@@ -3,9 +3,9 @@ fun foo() {
|
||||
fun test() {}
|
||||
}
|
||||
|
||||
val d: A
|
||||
val d: A =
|
||||
if (<caret>) {
|
||||
d = A()
|
||||
A()
|
||||
}
|
||||
|
||||
d.test()
|
||||
|
||||
+2
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user