Add continuation indent for wrapped type aliases
#KT-21078 Fixed fixup type alias
This commit is contained in:
@@ -539,7 +539,12 @@ private val INDENT_RULES = arrayOf<NodeIndentStrategy>(
|
|||||||
strategy("Array literals")
|
strategy("Array literals")
|
||||||
.within(KtNodeTypes.COLLECTION_LITERAL_EXPRESSION)
|
.within(KtNodeTypes.COLLECTION_LITERAL_EXPRESSION)
|
||||||
.notForType(LBRACKET, RBRACKET)
|
.notForType(LBRACKET, RBRACKET)
|
||||||
.set(Indent.getNormalIndent())
|
.set(Indent.getNormalIndent()),
|
||||||
|
|
||||||
|
strategy("Type aliases")
|
||||||
|
.within(KtNodeTypes.TYPEALIAS)
|
||||||
|
.notForType(KtTokens.TYPE_ALIAS_KEYWORD, KtTokens.EOL_COMMENT, KtNodeTypes.MODIFIER_LIST)
|
||||||
|
.set(Indent.getContinuationIndent())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -4,11 +4,11 @@ typealias B = Int
|
|||||||
typealias C = Int
|
typealias C = Int
|
||||||
|
|
||||||
typealias D =
|
typealias D =
|
||||||
Int
|
Int
|
||||||
|
|
||||||
//
|
//
|
||||||
typealias E =
|
typealias E =
|
||||||
Int
|
Int
|
||||||
|
|
||||||
typealias F = Int
|
typealias F = Int
|
||||||
//
|
//
|
||||||
@@ -33,4 +33,6 @@ typealias K = Int
|
|||||||
|
|
||||||
//
|
//
|
||||||
object OO
|
object OO
|
||||||
typealias L = Int
|
typealias L = Int
|
||||||
|
|
||||||
|
internal typealias M = Int
|
||||||
|
|||||||
+3
-1
@@ -25,4 +25,6 @@ class Y
|
|||||||
typealias K = Int
|
typealias K = Int
|
||||||
//
|
//
|
||||||
object OO
|
object OO
|
||||||
typealias L = Int
|
typealias L = Int
|
||||||
|
|
||||||
|
internal typealias M = Int
|
||||||
|
|||||||
Reference in New Issue
Block a user