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(WHERE_KEYWORD).spaces(1)
afterInside(GET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
afterInside(SET_KEYWORD, PROPERTY_ACCESSOR).spaces(0)
}
custom {
+2 -2
View File
@@ -1,9 +1,9 @@
class Test {
var test: Int
get () {
get() {
return 0
}
set (value) {
set(value) {
throw NotSupportedException()
}
}
+4
View File
@@ -49,4 +49,8 @@ var prop3: Int // Int
// this comment is for getter
get() = 1
// this comment is for setter
set(value) {}
val prop4: Int
get() = 42
set(value) {}
+5 -1
View File
@@ -52,4 +52,8 @@ var prop3: Int // Int
// this comment is for getter
get() = 1
// 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() {
return 1
}
set (value: Int) { /**/
set(value: Int) { /**/
}
public var varWithAccessors2: Int