aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-05 20:11:29 -0500
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-05 20:19:37 -0500
commit00a283c5d5305234a28f3eab3a0d1f150f8782c7 (patch)
treeb3f1ee63a805927e8340bf60bd6ab064ae8c462d /tests
parent85c0b64e169a0eedbea84328024757cb3188f6f3 (diff)
Fix hover info for local array types
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 5df5ba7..17f7c14 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5515,6 +5515,32 @@ ast_hover_proc_overload_with_less_args :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.foo :: proc(input: int) -> (out_struct: Foo, ok: bool)")
}
+
+@(test)
+ast_hover_array_type_local_scope :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ Arra{*}y :: [2]int
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.Array :: [2]int")
+}
+
+@(test)
+ast_hover_array_elem_local_scope :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ Array :: [2]int
+ array: Array
+ f{*}oo := array[0]
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo: int")
+}
/*
Waiting for odin fix