Remove spaces between accessor and its parameter list in formatter (KT-30393)

#KT-30393 Fixed
This commit is contained in:
kenji tomita
2019-03-16 06:19:29 +03:00
committed by Nikolay Krasko
parent 0acecb4936
commit e1f26ffc74
5 changed files with 15 additions and 4 deletions
@@ -388,6 +388,9 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
before(INDICES).spaces(0) before(INDICES).spaces(0)
before(WHERE_KEYWORD).spaces(1) before(WHERE_KEYWORD).spaces(1)
afterInside(GET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
afterInside(SET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
} }
custom { custom {
+2 -2
View File
@@ -1,9 +1,9 @@
class Test { class Test {
var test: Int var test: Int
get () { get() {
return 0 return 0
} }
set (value) { set(value) {
throw NotSupportedException() throw NotSupportedException()
} }
} }
+4
View File
@@ -50,3 +50,7 @@ var prop3: Int // Int
get() = 1 get() = 1
// this comment is for setter // this comment is for setter
set(value) {} set(value) {}
val prop4: Int
get() = 42
set(value) {}
+4
View File
@@ -53,3 +53,7 @@ var prop3: Int // Int
get() = 1 get() = 1
// this comment is for setter // this comment is for setter
set(value) {} set(value) {}
val prop4: Int
get () = 42
set (value) {}
+1 -1
View File
@@ -45,7 +45,7 @@ public var varWithAccessors1: Int
get() { get() {
return 1 return 1
} }
set (value: Int) { /**/ set(value: Int) { /**/
} }
public var varWithAccessors2: Int public var varWithAccessors2: Int