KT-1712 Formatting for getters and setters

#KT-1712 fixed
This commit is contained in:
Nikolay Krasko
2012-04-04 17:36:55 +04:00
parent 549c464983
commit a0d8ab6db5
13 changed files with 231 additions and 49 deletions
@@ -0,0 +1,9 @@
class Test {
var test : Int
get () {
return 0
}
set (value) {
throw NotSupportedException()
}
}
@@ -0,0 +1,9 @@
class Test {
var test : Int
get () {
return 0
}
set (value) {
throw NotSupportedException()
}
}
@@ -1,5 +1,5 @@
// "Change getter type to Int" "true"
class A() {
val i: Int
get(): Int = 1
get(): Int = 1
}
@@ -1,5 +1,5 @@
// "Change setter parameter type to Int" "true"
class A() {
var i: Int = 0
set(v: Int) {}
set(v: Int) {}
}
@@ -1,5 +1,5 @@
// "Change getter type to Int" "true"
class A() {
val i: Int
get(): <caret>Any = 1
get(): <caret>Any = 1
}
@@ -1,5 +1,5 @@
// "Change setter parameter type to Int" "true"
class A() {
var i: Int = 0
set(v: <caret>Any) {}
set(v: <caret>Any) {}
}
@@ -1,6 +1,6 @@
// "Make variable mutable" "true"
class A() {
var a : Int = 0
set(v : Int) {
}
set(v : Int) {
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
val Int.v : Int
get() {
<caret>
}
get() {
<caret>
}
+5 -5
View File
@@ -1,7 +1,7 @@
var Int.v : Int
get() {
<caret>
}
set(value) {
get() {
<caret>
}
set(value) {
}
}