diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index edba279..9a43587 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -3590,6 +3590,41 @@ ast_hover_parapoly_proc_dynamic_array_elems :: proc(t: ^testing.T) { "test.elem: ^$T" ) } + +@(test) +ast_hover_parapoly_proc_slice_param :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc(x: $T) -> T { + return x + } + + main :: proc() { + x : []u8 + b{*}ar := foo(x) + } + `, + } + test.expect_hover(t, &source, "test.bar: []u8") +} + +@(test) +ast_hover_parapoly_proc_multi_pointer_param :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc(x: ^$T) -> ^T { + return x + } + + + main :: proc() { + x : [^]u8 + b{*}ar := foo(x) + } + `, + } + test.expect_hover(t, &source, "test.bar: ^[^]u8") +} /* Waiting for odin fix |