Smart completion: inheritors instantiation suggested + fixed a bug with incorrect presentation of generic java class instantiation
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package p1
|
||||
|
||||
fun foo(): p2.KotlinTrait {
|
||||
return <caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "object", itemText: "object: KotlinTrait{...}" }
|
||||
// EXIST: { lookupString: "KotlinInheritor1", itemText: "KotlinInheritor1", tailText: "() (p2)" }
|
||||
// EXIST: { lookupString: "KotlinInheritor2", itemText: "KotlinInheritor2", tailText: "(s: String) (p2)" }
|
||||
// EXIST: { lookupString: "object", itemText: "object: KotlinInheritor3(){...}" }
|
||||
// ABSENT: PrivateInheritor
|
||||
// EXIST: { lookupString: "object", itemText: "object: JavaInheritor1(){...}" }
|
||||
// EXIST: { lookupString: "JavaInheritor2", itemText: "JavaInheritor2", tailText: "(...) (<root>)" }
|
||||
// ABSENT: JavaInheritor3
|
||||
// EXIST: { lookupString: "ObjectInheritor", itemText: "ObjectInheritor", tailText: " (p2)" }
|
||||
@@ -0,0 +1,16 @@
|
||||
import p2.KotlinTrait
|
||||
|
||||
public abstract class JavaInheritor1 implements KotlinTrait {
|
||||
}
|
||||
|
||||
public class JavaInheritor2 extends JavaInheritor1 {
|
||||
public JavaInheritor2() {
|
||||
}
|
||||
|
||||
public JavaInheritor2(int p) {
|
||||
}
|
||||
}
|
||||
|
||||
// not visible - it's package local
|
||||
class JavaInheritor3 extends KotlinTrait {}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package p2
|
||||
|
||||
trait KotlinTrait
|
||||
|
||||
open class KotlinInheritor1 : KotlinTrait
|
||||
|
||||
class KotlinInheritor2(s: String) : KotlinInheritor1()
|
||||
|
||||
abstract class KotlinInheritor3 : KotlinTrait
|
||||
|
||||
class C {
|
||||
private class PrivateInheritor : KotlinTrait
|
||||
}
|
||||
|
||||
object ObjectInheritor : KotlinTrait
|
||||
|
||||
// ALLOW_AST_ACCESS
|
||||
Reference in New Issue
Block a user