Formatter: Remove spaces before question mark in nullable types (KT-12830)

#KT-12830 Fixed
This commit is contained in:
Kirill Rakhman
2016-06-23 22:54:30 +02:00
committed by Nikolay Krasko
parent 9a50e91cd8
commit 0320bd8184
5 changed files with 16 additions and 0 deletions
@@ -223,6 +223,8 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
beforeInside(INITIALIZER_LIST, ENUM_ENTRY).spaces(0)
beforeInside(QUEST, NULLABLE_TYPE).spaces(0)
val TYPE_COLON_ELEMENTS = TokenSet.create(PROPERTY, FUN, VALUE_PARAMETER, DESTRUCTURING_DECLARATION_ENTRY, FUNCTION_LITERAL)
beforeInside(COLON, TYPE_COLON_ELEMENTS) { spaceIf(kotlinSettings.SPACE_BEFORE_TYPE_COLON) }
afterInside(COLON, TYPE_COLON_ELEMENTS) { spaceIf(kotlinSettings.SPACE_AFTER_TYPE_COLON) }