KT-9835 Completion thinks receiver is nullable when it is not

#KT-9835 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-10-11 17:12:41 +03:00
parent 7b12dd498f
commit 0399772ee6
10 changed files with 73 additions and 10 deletions
@@ -0,0 +1,15 @@
interface R<T>
val <T> R<T>.prop: Int get() = TODO()
fun <T> R<T>.extFun(): Int = TODO()
interface I
fun foo(r: R<out I>) {
r.<caret>
}
// EXIST: { itemText: "prop", typeText: "Int", attributes: "bold" }
// EXIST: { itemText: "extFun", typeText: "Int", attributes: "bold" }
@@ -2,9 +2,14 @@ fun foo(klass: Class<*>) {
klass.<caret>
}
fun <T> Class<T>.extFun(): Class<in T> = TODO()
// EXIST: simpleName
// ABSENT: getSimpleName
// EXIST: enclosingClass
// ABSENT: getEnclosingClass
// EXIST: annotations
// ABSENT: getAnnotations
// EXIST: superclass
// ABSENT: getSuperclass
// EXIST: extFun
@@ -0,0 +1,4 @@
public interface R<D extends I> {
int getFoo();
int f();
}
@@ -0,0 +1,8 @@
interface I
fun foo(r: R<out I>) {
r.<caret>
}
// EXIST: { itemText: "foo", tailText: " (from getFoo())", typeText: "Int", attributes: "bold" }
// EXIST: { itemText: "f", tailText: "()", typeText: "Int", attributes: "bold" }