Filtering out type parameters that are not visible at the completion point

This commit is contained in:
Valentin Kipyatkov
2015-06-23 13:02:54 +03:00
parent e894a04ce6
commit afa46f1c95
12 changed files with 154 additions and 20 deletions
@@ -0,0 +1,7 @@
class X<T> {
class Nested {
val v: <caret>
}
}
// ABSENT: T
@@ -0,0 +1,19 @@
package ppp
import java.io.*
class X {
public class PublicNested
private class PrivateNested
fun f1(nested: PublicNested) { }
fun f2(nested: PrivateNested) { }
fun f3(nestedList: List<PublicNested>) { }
fun f4(nestedList: List<PrivateNested>) { }
}
class C(val neste<caret>)
// EXIST: { lookupString: "nested", itemText: "nested: X.PublicNested", tailText: " (ppp)" }
// EXIST: { lookupString: "nestedList", itemText: "nestedList: List<X.PublicNested>", tailText: " (kotlin)" }
// NOTHING_ELSE
@@ -0,0 +1,10 @@
package ppp
class X<T1> {
fun <T2> f(xxxValue1: T1, xxxValue2: T2, xxxValue3: (T2) -> Unit){}
fun foo(xxx<caret>)
}
// EXIST: { lookupString: "xxxValue1", itemText: "xxxValue1: T1", tailText: null }
// NOTHING_ELSE
@@ -0,0 +1,11 @@
package ppp
class X<T1> {
fun <T2> f5(xxxValue1: T1, xxxValue2: T2){}
class Nested {
fun foo(xxx<caret>)
}
}
// NOTHING_ELSE
@@ -0,0 +1,12 @@
package ppp
class X<T1> {
fun <T2> f5(xxxValue1: T1, xxxValue2: T2){}
inner class Nested {
fun foo(xxx<caret>)
}
}
// EXIST: { lookupString: "xxxValue1", itemText: "xxxValue1: T1", tailText: null }
// NOTHING_ELSE