aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-10 15:43:58 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-10 15:51:52 -0400
commit8dd1daad7182cc7a9e218cb15e54fff09d47309d (patch)
tree8a8fc91171c637fb146a25176b85b8d0c8e58316 /tests
parentc39593e3c2a209630c20f5cc27cb29406276953c (diff)
Add hover support for substring slices
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 2d7043a..cbb7ba9 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -839,6 +839,20 @@ ast_hover_proc_overload_definition :: proc(t: ^testing.T) {
test.expect_hover(t, &source, "test.foo: proc {\n\tfoo_none :: proc(allocator := context.allocator) -> (_: int, _: bool),\n\tfoo_int :: proc(i: int, allocator := context.allocator) -> (_: int, _: bool),\n}")
}
+
+@(test)
+ast_hover_sub_string_slices :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ str := "Hello, World!"
+ s{*}ub_str := str[0:5]
+ }
+ `
+ }
+
+ test.expect_hover(t, &source, "test.sub_str: string")
+}
/*
Waiting for odin fix