FIR IDE: Fix completion in property setters

Property consists of getter and setter (both optional). The setter
have a single `value` parameter with type

Because of it, we have to make a separate 'frankenstein setter' with
original resolved header, but with the body of the fake one

It seems that getters does not have such issues
This commit is contained in:
Roman Golyshev
2020-09-08 15:06:16 +03:00
parent 5c1520305b
commit dcc22d3e5d
13 changed files with 204 additions and 1 deletions
@@ -0,0 +1,10 @@
// FIR_COMPARISON
fun localFun(): Int {}
val property: Int
get() {
<caret>
}
// EXIST: localFun
@@ -0,0 +1,8 @@
// FIR_COMPARISON
fun localFun(): Int {}
val property: Int
get() = <caret>
// EXIST: localFun
@@ -0,0 +1,8 @@
// FIR_COMPARISON
class LocalType
val property
get(): <caret>
// EXIST: LocalType
@@ -0,0 +1,7 @@
// FIR_COMPARISON
fun localFun(): Int {}
val property = <caret>
// EXIST: localFun
@@ -0,0 +1,11 @@
// FIR_COMPARISON
fun localFun() {}
var property: Int
get() = 1
set(value) {
<caret>
}
// EXIST: localFun
@@ -0,0 +1,9 @@
// FIR_COMPARISON
fun localFun() {}
var property: Int
get() = 1
set(value) = <caret>
// EXIST: localFun
@@ -0,0 +1,7 @@
// FIR_COMPARISON
class LocalType
val property: <caret>
// EXIST: LocalType