handle setter calls used as expression bodies in "Use property access syntax" intention
#KT-10587 Fixed
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(thread: Thread) = thread.setName("<name>")<caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(thread: Thread) {
|
||||
thread.name = "<name>"
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
var Thread.otherName: String
|
||||
get() = getName()
|
||||
set(value) = setName(value)<caret>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
var Thread.otherName: String
|
||||
get() = getName()
|
||||
set(value) {
|
||||
name = value
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
class C: Thread() {
|
||||
fun foo(n: String) = setName(n)<caret>
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
class C: Thread() {
|
||||
fun foo(n: String) {
|
||||
name = n
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user