Allow removing trivial property accessor body when the accessor can not be fully deleted in redundant getter/setter inspections
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// PROBLEM: none
|
||||
class Foo {
|
||||
val foo: String = ""
|
||||
@Deprecated("") <caret>get() {
|
||||
1 + 2
|
||||
return field
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
val foo: String = ""
|
||||
@Deprecated("") <caret>get() {
|
||||
return field
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
val foo: String = ""
|
||||
@Deprecated("") <caret>get
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
val foo: String = ""
|
||||
@Deprecated("") <caret>get() = field
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
val foo: String = ""
|
||||
@Deprecated("") get
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// PROBLEM: none
|
||||
class Foo {
|
||||
var foo: String = ""
|
||||
@Deprecated("") <caret>set(foo) {
|
||||
1 + 2
|
||||
field = foo
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
var foo: String = ""
|
||||
@Deprecated("") <caret>set(x) {
|
||||
field = x
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
var foo: String = ""
|
||||
@Deprecated("") set
|
||||
}
|
||||
Reference in New Issue
Block a user