Better smart completion after "by" for override property with no explicit type specified

This commit is contained in:
Valentin Kipyatkov
2016-04-01 15:52:36 +03:00
parent f85de3aac7
commit 7af67da4ac
3 changed files with 37 additions and 0 deletions
@@ -0,0 +1,30 @@
import kotlin.reflect.KProperty
abstract class Base {
abstract val property: Number
}
class Derived : Base() {
override val property by <caret>
}
class X1 {
operator fun getValue(thisRef: Any, property: KProperty<*>): Number = 1
}
class X2 {
operator fun getValue(thisRef: Any, property: KProperty<*>): String = ""
}
class X3 {
operator fun getValue(thisRef: Any, property: KProperty<*>): Int = ""
}
// EXIST: lazy
// EXIST: { itemText: "Delegates.notNull", tailText:"() (kotlin.properties)", typeText: "ReadWriteProperty<Any?, Number>", attributes:"" }
// EXIST: { itemText: "Delegates.observable", tailText:"(initialValue: Number, crossinline onChange: (KProperty<*>, Number, Number) -> Unit) (kotlin.properties)", typeText: "ReadWriteProperty<Any?, Number>", attributes:"" }
// EXIST: { itemText: "Delegates.vetoable", tailText:"(initialValue: Number, crossinline onChange: (KProperty<*>, Number, Number) -> Boolean) (kotlin.properties)", typeText: "ReadWriteProperty<Any?, Number>", attributes:"" }
// EXIST: X1
// ABSENT: X2
// EXIST: X3