KT-6191 Support completion for backing field
#KT-6191 Fixed
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
var globalProperty = "abc" // has backing field and accessor but backing field is not accessible
|
||||
get() = $globalProperty + 1
|
||||
|
||||
class C {
|
||||
var property1 = "abc" // has backing field but accessors are default - no sense to show in completion
|
||||
|
||||
var property2 = "abc" // has backing field but accessors are also default
|
||||
private set
|
||||
|
||||
var property3: String // no backing field
|
||||
get() = "abc"
|
||||
set(value){}
|
||||
|
||||
var property4 = "abc" // has backing field and accessor
|
||||
get() = $property4 + 1
|
||||
|
||||
fun foo(){
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// ABSENT: $globalProperty
|
||||
// ABSENT: $property1
|
||||
// ABSENT: $property2
|
||||
// ABSENT: $property3
|
||||
// EXIST: { lookupString: "$property4", itemText: "$property4", tailText: null, typeText: "String" }
|
||||
@@ -0,0 +1,4 @@
|
||||
var globalProperty = "abc"
|
||||
get() = <caret>
|
||||
|
||||
// EXIST: $globalProperty
|
||||
@@ -0,0 +1,11 @@
|
||||
class C {
|
||||
var property = "abc"
|
||||
get() = $property + 1
|
||||
}
|
||||
|
||||
|
||||
fun foo(c: C){
|
||||
c.<caret>
|
||||
}
|
||||
|
||||
// ABSENT: $property
|
||||
@@ -0,0 +1,10 @@
|
||||
class C {
|
||||
var property = "abc"
|
||||
get() = $property + 1
|
||||
|
||||
fun foo() {
|
||||
this.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: $property
|
||||
@@ -0,0 +1,15 @@
|
||||
class C {
|
||||
var property1 = "abc"
|
||||
get() = $property1 + 1
|
||||
var property2 = "abc"
|
||||
get() = $property2 + 1
|
||||
|
||||
fun foo(){
|
||||
$<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: $property1
|
||||
// EXIST: $property2
|
||||
// ABSENT: property1
|
||||
// ABSENT: property2
|
||||
@@ -0,0 +1,13 @@
|
||||
class C {
|
||||
var aProperty = "abc"
|
||||
get() {}
|
||||
var bProperty = "abc"
|
||||
get() {}
|
||||
|
||||
fun foo(){
|
||||
$a<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: $aProperty
|
||||
// ABSENT: $bProperty
|
||||
@@ -0,0 +1,15 @@
|
||||
class C {
|
||||
var property1 = "abc"
|
||||
get() = $property1 + 1
|
||||
var property2 = "abc"
|
||||
get() = $property2 + 1
|
||||
|
||||
fun foo(){
|
||||
"${$<caret>}"
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: $property1
|
||||
// EXIST: $property2
|
||||
// ABSENT: property1
|
||||
// ABSENT: property2
|
||||
Reference in New Issue
Block a user