Skip to content

Commit 1065a0e

Browse files
authored
fix(tolk/completion): don't show type parameter in value completion (#69)
Fixes #58
1 parent 2bcfd8a commit 1065a0e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

server/src/e2e/tolk/testcases/completion/local.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,12 @@ fun foo() {
107107
------------------------------------------------------------------------
108108
5 some int
109109
5 someOther slice
110+
111+
========================================================================
112+
No type parameters completion as value
113+
========================================================================
114+
fun foo<TName, TName2>() {
115+
TNam<caret>;
116+
}
117+
------------------------------------------------------------------------
118+
No completion items

server/src/languages/tolk/completion/ReferenceCompletionProcessor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export class ReferenceCompletionProcessor implements ScopeProcessor {
5555
}
5656
}
5757

58+
if (node instanceof TypeParameter) return false
59+
5860
// since structs can be created like `Foo{}` we allow them
5961
if (node instanceof Struct) return true
6062
return true

0 commit comments

Comments
 (0)