Insert line break before elvis when converting if to elvis
This ensures correct indentation
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
fun foo(p: List<String?>): Int {
|
||||
val v = p[0] ?: // return -1 if null
|
||||
val v = p[0]
|
||||
?: // return -1 if null
|
||||
<caret>return -1
|
||||
return v.length
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
fun foo(p: List<String?>): Int {
|
||||
val v = p[0] ?: // v is null
|
||||
val v = p[0]
|
||||
?: // v is null
|
||||
// we should do something with it
|
||||
return -1 // let's return -1
|
||||
// end of if
|
||||
|
||||
Reference in New Issue
Block a user