aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-06 18:14:40 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-06 18:14:40 -0400
commitb227fafa83e2cf06f961534b6b0f512e5354c9db (patch)
treea42d36599908a4d52e7f201686c4b4701a095f40 /src/server
parentc3110e2561b141dac0f1345d811ab7a54ded0d3b (diff)
Add completion for poly type narrowing
Diffstat (limited to 'src/server')
-rw-r--r--src/server/completion.odin6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index 29ae7bb..732a940 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1553,6 +1553,12 @@ get_identifier_completion :: proc(
if position_context.identifier != nil {
if ident, ok := position_context.identifier.derived.(^ast.Ident); ok {
lookup_name = ident.name
+ } else if poly, ok := position_context.identifier.derived.(^ast.Poly_Type); ok {
+ if poly.specialization != nil {
+ if ident, ok := poly.specialization.derived.(^ast.Ident); ok {
+ lookup_name = ident.name
+ }
+ }
}
}