diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 9a1f47e..09f4bb9 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5571,6 +5571,34 @@ ast_hover_soa_poly_proc :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.bar: #soa^#soa[dynamic]struct{}") } + +@(test) +ast_hover_slice_function_call :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc() -> []int {} + + main :: proc() { + x{*} := foo()[:1] + } + `, + } + test.expect_hover(t, &source, "test.x: []int") +} + +@(test) +ast_hover_index_function_call :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc() -> []int {} + + main :: proc() { + x{*} := foo()[0] + } + `, + } + test.expect_hover(t, &source, "test.x: int") +} /* Waiting for odin fix |