aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-07 14:43:15 +1100
committerGitHub <noreply@github.com>2025-12-07 14:43:15 +1100
commit465e4b4f1472ee4a2786321409d9f58eb79259e8 (patch)
tree5499b4783eae99a29056b67a4493dcbaeb376014 /tests
parent265db94b731bdb7388e0d6af52fd8d9a0d93c01c (diff)
parent236f2f1f684577a8bf7daf1f0decfd2686755d05 (diff)
Merge pull request #1209 from BradLewis/fix/selector-completions-global-const
Fix selector completions for global constant declarations
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 72dcb86..5ab4181 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -5130,3 +5130,21 @@ ast_completion_implicit_selector_binary_expr :: proc(t: ^testing.T) {
}
test.expect_completion_docs(t, &source, "", {"A", "B"})
}
+
+@(test)
+ast_completion_global_selector_from_local_scope :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Foo :: struct {
+ foo: int,
+ }
+
+ FOO :: Foo{}
+
+ main :: proc() {
+ FOO.{*}
+ }
+ `,
+ }
+ test.expect_completion_docs(t, &source, "", {"Foo.foo: int"})
+}