SAM-adapters are sorted as non-extensions in completion and with correct boldness + no parameter names when from compiled

This commit is contained in:
Valentin Kipyatkov
2015-08-13 21:10:26 +03:00
parent 13fc12bbae
commit b6cf39981f
11 changed files with 144 additions and 54 deletions
@@ -1,6 +0,0 @@
import lib.JavaClass
fun test() = JavaClass().<caret>
// EXIST: { lookupString: "execute", itemText: "execute", tailText: "(Runnable!)", typeText: "Unit" }
// EXIST: { lookupString: "execute", itemText: "execute", tailText: " {...} ((() -> Unit)!)", typeText: "Unit" }
@@ -1,5 +0,0 @@
package lib;
public class JavaClass {
public void execute(Runnable runnable) {}
}
@@ -0,0 +1,8 @@
import lib.JavaClass
class KotlinClass : JavaClass()
fun test() = KotlinClass().<caret>
// EXIST: { lookupString: "execute", itemText: "execute", tailText: "(Runnable!, Int)", typeText: "Unit", attributes: "" }
// EXIST: { lookupString: "execute", itemText: "execute", tailText: "((() -> Unit)!, Int)", typeText: "Unit", attributes: "" }
@@ -0,0 +1,8 @@
import lib.*;
fun foo(j: JavaInterface<String>) {
j.<caret>
}
// EXIST: { lookupString: "execute", itemText: "execute", tailText: "(Task<String!>!, K!)", typeText: "String!", attributes: "bold" }
// EXIST: { lookupString: "execute", itemText: "execute", tailText: "(((String!) -> Unit)!, K!)", typeText: "String!", attributes: "bold" }
@@ -0,0 +1,5 @@
package lib;
public interface JavaInterface<T> {
<K> T execute(Task<T> task, K k);
}
@@ -0,0 +1,5 @@
package lib;
public interface Task<T> {
void run(T t);
}
@@ -0,0 +1,5 @@
package lib;
public class JavaClass {
public void execute(Runnable runnable, int x) {}
}