From c72350d844e15c530e0b3da1ff2faf6e91dfa7c2 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Mon, 22 Sep 2025 16:18:02 -0400 Subject: Substitute poly types for generic maps --- tests/hover_test.odin | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests') diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 562a2d6..3063d13 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4980,6 +4980,25 @@ ast_hover_proc_impl :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.foo :: proc(a: int) -> int") } + +@(test) +ast_hover_proc_overload_generic_map :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + clear_dynamic_array :: proc "contextless" (array: ^$T/[dynamic]$E) {} + clear_map :: proc "contextless" (m: ^$T/map[$K]$V) {} + clear :: proc{ + clear_dynamic_array, + clear_map, + } + main :: proc() { + foo: map[int]string + c{*}lear(&foo) + } + `, + } + test.expect_hover(t, &source, "test.clear :: proc(m: ^$T/map[$K]$V)") +} /* Waiting for odin fix -- cgit v1.2.3