summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-07 05:15:36 -0500
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-07 05:18:57 -0500
commitcf74b5f1133217a7454b8b932e818e891ebdefb0 (patch)
tree2418af84f73a92e36591ae8c8752471b1e54732c /tests
parent8d1626323b163cbce7b467b20d66c723e7605332 (diff)
Correctly resolve poly proc returns with #soa arrays
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 20ef118..9a1f47e 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5556,6 +5556,21 @@ ast_hover_array_of_array_type_x_elem_local_scope :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.foo: [2]int")
}
+
+@(test)
+ast_hover_soa_poly_proc :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc (arr: ^#soa[dynamic]$E) -> #soa^#soa[dynamic]E {}
+
+ main :: proc() {
+ array: #soa[dynamic]struct{}
+ b{*}ar := foo(&array)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: #soa^#soa[dynamic]struct{}")
+}
/*
Waiting for odin fix