Ident elvis with normal ident in Kotlin code style (KT-25008)

#KT-25008 Fixed
This commit is contained in:
Nikolay Krasko
2018-06-21 20:47:06 +03:00
parent 341e7746a2
commit 8e31113a4f
9 changed files with 61 additions and 1 deletions
@@ -0,0 +1,6 @@
fun test(some: Any?, error: Int) {
val test = some
?: error
}
// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS
@@ -0,0 +1,6 @@
fun test(some: Any?, error: Int) {
val test = some
?: error
}
// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS
@@ -0,0 +1,6 @@
fun test(some: Any?, error: Int) {
val test = some
?: error
}
// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS
+14
View File
@@ -0,0 +1,14 @@
fun foo() {
val topLevelDeclaration =
DescriptorUtils.getParentOfType(referencedDescriptor, PropertyDescriptor::class.java, false) as DeclarationDescriptor?
?: DescriptorUtils.getParentOfType(
referencedDescriptor,
TypeAliasConstructorDescriptor::class.java,
false
)?.typeAliasDescriptor
?: DescriptorUtils.getParentOfType(referencedDescriptor, FunctionDescriptor::class.java, false)
?: return emptyList()
}
// SET_FALSE: CONTINUATION_INDENT_IN_ARGUMENT_LISTS
// SET_FALSE: CONTINUATION_INDENT_FOR_EXPRESSION_BODIES