Competion in debugger for runtime receiver type should not show members grayed

This commit is contained in:
Valentin Kipyatkov
2015-10-28 21:49:21 +03:00
parent af441d32b1
commit 4ab2019da4
27 changed files with 168 additions and 92 deletions
@@ -3,6 +3,7 @@ fun foo(o: Any) {
}
// INVOCATION_COUNT: 1
// EXIST: read, write
// EXIST: { itemText: "read", attributes: "bold" }
// EXIST: { itemText: "write", attributes: "bold" }
// RUNTIME_TYPE: java.util.concurrent.locks.ReentrantReadWriteLock
@@ -12,7 +12,11 @@ open class Base {
fun funInBoth() { }
}
class Derived: Base() {
open class Intermediate : Base() {
fun funInIntermediate(){}
}
class Derived : Intermediate() {
fun funInDerived() { }
override fun funWithOverride() { }
@@ -21,12 +25,13 @@ class Derived: Base() {
}
// INVOCATION_COUNT: 1
// EXIST: funInBase
// EXIST: funWithOverride
// EXIST: funWithoutOverride
// EXIST: funInDerived
// EXIST: { itemText: "funInBase", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funWithOverride", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funWithoutOverride", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInDerived", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInBoth", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInBoth", tailText: "(p: Int)", attributes: "grayed" }
// EXIST: { itemText: "funInBoth", tailText: "(p: Int)", attributes: "bold" }
// EXIST: { itemText: "funInIntermediate", tailText: "()", attributes: "" }
// NOTHING_ELSE
@@ -0,0 +1,41 @@
fun main(args: Array<String>) {
val b: Base = Derived()
<caret>val a = 1
}
open class Base {
fun funInBase(): Int = 0
open fun funWithOverride(): Int = 0
open fun funWithoutOverride(): Int = 0
fun funInBoth(): Int = 0
}
open class Intermediate : Base() {
fun funInIntermediate() = 0
}
class Derived : Intermediate() {
fun funInDerived(): Int = 0
override fun funWithOverride(): Int = 0
fun funInBoth(p: Int): Int = 0
fun funWrongType(): String = ""
}
// COMPLETION_TYPE: SMART
// INVOCATION_COUNT: 1
// EXIST: { itemText: "funInBase", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funWithOverride", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funWithoutOverride", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInDerived", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInBoth", tailText: "()", attributes: "bold" }
// EXIST: { itemText: "funInBoth", tailText: "(p: Int)", attributes: "bold" }
// EXIST: { itemText: "funInIntermediate", tailText: "()", attributes: "" }
// NOTHING_ELSE
// RUNTIME_TYPE: Derived
@@ -0,0 +1 @@
"".substring(b.fun<caret>)