Inline Property supported for properties with setter
#KT-2638 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
var property = 10
|
||||
private set
|
||||
|
||||
fun f() {
|
||||
println(<caret>property)
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
|
||||
fun f() {
|
||||
println(10)
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
var Int.<caret>property: Int
|
||||
get() = this
|
||||
set(value) {
|
||||
println("Set value of $value for $this")
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
println(1.property)
|
||||
2.property = 10
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
println(1)
|
||||
println("Set value of ${10} for ${2}")
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// ERROR: The following usages are not supported by the Inline refactoring. They won't be processed.\nUnsupported usage: property++
|
||||
|
||||
var <caret>property: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
property++
|
||||
}
|
||||
Reference in New Issue
Block a user