aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-21 10:00:48 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-21 10:00:48 -0400
commit225b794cd3bbb0f116a4cf6e389aa5194c5eca46 (patch)
treea9728e212a63dc84c9f1ed0e2a567ce62687375c /tests/hover_test.odin
parent405e8ede2eaf2fbccb6ffbaa6b24a434665b056d (diff)
Add `#type` to proc type hover information to distinguish with proc implementations
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index fc66f64..562a2d6 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -182,7 +182,7 @@ ast_hover_procedure_with_default_comp_lit :: proc(t: ^testing.T) {
`,
}
- test.expect_hover(t, &source, "test.fa :: proc(color_: Color = {255, 255, 255, 255})")
+ test.expect_hover(t, &source, "test.fa :: #type proc(color_: Color = {255, 255, 255, 255})")
}
@(test)
@@ -4958,6 +4958,28 @@ ast_hover_const_complex_comp_lit :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.COLOURS :: Colours {\n\tblue = frgba{0.1, 0.1, 0.1, 0.1},\n\tgreen = frgba{0.1, 0.1, 0.1, 0.1},\n\tfoo = {\n\t\ta = 32,\n\t\tb = \"testing\",\n\t},\n\tbar = 1 + 2,\n}")
}
+
+@(test)
+ast_hover_proc_type :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ f{*}oo :: proc(a: int) -> int
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo :: #type proc(a: int) -> int")
+}
+
+@(test)
+ast_hover_proc_impl :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ f{*}oo :: proc(a: int) -> int {
+ return a + 1
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo :: proc(a: int) -> int")
+}
/*
Waiting for odin fix