aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-28 19:57:46 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-28 19:57:46 -0400
commit8108406b5c7be2875502260a0168636976a7bbbc (patch)
tree31cccb32c1939d64eeb5d52730890f83d27b2e61 /tests/hover_test.odin
parent342fdfdd764311beda4efd1c185cbee8b12e864f (diff)
Find and replace poly types for call expr
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index d0b844e..f2ff18c 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5112,6 +5112,29 @@ ast_hover_matrix_index_twice :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.b: f32")
}
+
+@(test)
+ast_hover_parapoly_proc_slice_param_return :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ Iter :: struct(T: typeid) {
+ slice: []T,
+ index: int,
+ }
+
+ make_iter :: proc(slice: []$T) -> Iter(T) {
+ return { slice, 0 }
+ }
+
+ main :: proc() {
+ slice := []string{}
+ i{*}t := make_iter(slice)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.it: test.Iter(string)")
+}
/*
Waiting for odin fix