diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-19 12:59:24 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-19 12:59:24 -0400 |
| commit | fe82c4f2c8287d604f4ad10bd66bdf8eb01907d5 (patch) | |
| tree | 3db3033a7c647b1e4f03356eb2c3d90d8bde9b80 /tests/hover_test.odin | |
| parent | 6c0ac3154551bbe27a897cdf610de15bcb3fd678 (diff) | |
Propagate proc group comments when hover hover a proc group call
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 16bbf69..7cf8057 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -397,7 +397,8 @@ ast_hover_proc_group :: proc(t: ^testing.T) { add_vec :: proc(a, b: [2]f32) -> [2]f32 {return a + b} - add :: proc { + // docs + add :: proc { // comment add_num, add_vec, } @@ -409,7 +410,7 @@ ast_hover_proc_group :: proc(t: ^testing.T) { packages = {}, } - test.expect_hover(t, &source, "test.add: proc(a, b: int) -> int") + test.expect_hover(t, &source, "test.add: proc(a, b: int) -> int\n docs\n\n// comment") } @(test) @@ -1069,7 +1070,8 @@ ast_hover_proc_overloading_named_arg_with_selector_expr_with_another_package :: foo_string :: proc(s: string, x := 1) -> (int, bool) { return 2, true } - foo :: proc { + // Docs + foo :: proc { // comment foo_none, foo_string, } @@ -1091,7 +1093,7 @@ ast_hover_proc_overloading_named_arg_with_selector_expr_with_another_package :: packages = packages[:], } - test.expect_hover(t, &source, "my_package.foo: proc(x := 1) -> (_: int, _: bool)") + test.expect_hover(t, &source, "my_package.foo: proc(x := 1) -> (_: int, _: bool)\n Docs\n\n// comment") } @(test) |