diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-13 20:32:52 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-13 20:48:41 +1100 |
| commit | 7ff40355acbde42e9c92851755d52ab54e3a5b6e (patch) | |
| tree | 984eb1d438fd40449902addbccf022959f9bd3d0 /tests | |
| parent | 1e5b0e771d9409afb54c81d93f83a26564132cc5 (diff) | |
Correcly resolve overloaded procs that use array types with pointer types
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 74cf0d0..c207da1 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -6156,6 +6156,28 @@ ast_hover_import_path_package_docs :: proc(t: ^testing.T) { test.expect_hover(t, &source, "my_package: package\n---\nPackage docs") } +@(test) +ast_hover_proc_overload_generic_array_pointer_types :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo_dynamic_array :: proc(array: $A/[dynamic]^$T) {} + foo_slice :: proc(array: $A/[]^$T) {} + + foo :: proc{ + foo_dynamic_array, + foo_slice, + } + + main :: proc() { + array: [dynamic]^int + f{*}oo(array) + } + `, + } + + test.expect_hover(t, &source, "test.foo :: proc(array: $A/[dynamic]^$T)") +} + /* Waiting for odin fix |