Correct substitutions for smart completion after "by" and "in"
This commit is contained in:
@@ -4,7 +4,7 @@ class C {
|
||||
val v by Delegates.<caret>
|
||||
}
|
||||
|
||||
// EXIST: notNull
|
||||
// EXIST: observable
|
||||
// EXIST: vetoable
|
||||
// EXIST: { itemText: "notNull", typeText: "ReadWriteProperty<Any?, T>" }
|
||||
// EXIST: { itemText: "observable", typeText: "ReadWriteProperty<Any?, T>" }
|
||||
// EXIST: { itemText: "vetoable", typeText: "ReadWriteProperty<Any?, T>" }
|
||||
// NOTHING_ELSE
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class C {
|
||||
val v: String by Delegates.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "notNull", typeText: "ReadWriteProperty<Any?, String>" }
|
||||
// EXIST: { itemText: "observable", typeText: "ReadWriteProperty<Any?, String>" }
|
||||
// EXIST: { itemText: "vetoable", typeText: "ReadWriteProperty<Any?, String>" }
|
||||
// NOTHING_ELSE
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Property<TOwner, TValue>
|
||||
|
||||
operator fun <TValue, TOwner> Property<TOwner, TValue>.getValue(thisRef: TOwner, property: KProperty<*>): TValue {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun<TOwner, TValue> createProperty(): Property<TOwner, TValue> = Property()
|
||||
|
||||
class C {
|
||||
val v by create<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "createProperty", typeText: "Property<C, TValue>" }
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Property<TOwner, TValue>
|
||||
|
||||
operator fun <TValue, TOwner> Property<TOwner, TValue>.getValue(thisRef: TOwner, property: KProperty<*>): TValue {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun<TOwner, TValue> createProperty(): Property<TOwner, TValue> = Property()
|
||||
|
||||
class C {
|
||||
val v: Int by create<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "createProperty", typeText: "Property<C, Int>" }
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Property<TOwner1, TValue1>
|
||||
|
||||
operator fun <TValue2, TOwner2> Property<TOwner2, TValue2>.getValue(thisRef: TOwner2, property: KProperty<*>): TValue2 {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
operator fun <TValue3, TOwner3> Property<TOwner3, TValue3>.setValue(thisRef: TOwner3, property: KProperty<*>, value: TValue3) {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun<TOwner4, TValue4> createProperty(): Property<TOwner4, TValue4> = Property()
|
||||
|
||||
class C {
|
||||
var v by create<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "createProperty", typeText: "Property<C, TValue4>" }
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Property<TOwner1, TValue1>
|
||||
|
||||
operator fun <TValue2, TOwner2> Property<TOwner2, TValue2>.getValue(thisRef: TOwner2, property: KProperty<*>): TValue2 {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
operator fun <TValue3, TOwner3> Property<TOwner3, TValue3>.setValue(thisRef: TOwner3, property: KProperty<*>, value: TValue3) {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun<TOwner4, TValue4> createProperty(): Property<TOwner4, TValue4> = Property()
|
||||
|
||||
class C {
|
||||
var v: Int by create<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "createProperty", typeText: "Property<C, Int>" }
|
||||
Reference in New Issue
Block a user