File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
server/src/main/kotlin/org/javacs/kt/index Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,10 @@ class SymbolIndex {
9696 }
9797
9898 fun query (prefix : String , receiverType : FqName ? = null, limit : Int = 20): List <Symbol > = transaction(db) {
99+ // TODO: Extension completion currently only works if the receiver matches exactly,
100+ // ideally this should work with subtypes as well
99101 (Symbols innerJoin FqNames )
100- .select {
101- FqNames .shortName
102- .like(" $prefix %" )
103- .let { q ->
104- receiverType?.let { t ->
105- q and (Symbols .extensionReceiverType eq wrapAsExpression(FqNames .slice(FqNames .fqName.count()).select { FqNames .shortName.like(" $t %" ) }))
106- } ? : q
107- }
108- }
102+ .select { FqNames .shortName.like(" $prefix %" ) and (Symbols .extensionReceiverType eq receiverType?.toString()) }
109103 .limit(limit)
110104 .map { Symbol (
111105 fqName = FqName (it[Symbols .fqName]),
You can’t perform that action at this time.
0 commit comments