From 62815da83221944cc45a01c11637bf2331773408 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:02:38 -0400 Subject: Correctly display hover info for bitset with underlying type --- src/server/ast.odin | 5 ++++- tests/hover_test.odin | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/server/ast.odin b/src/server/ast.odin index f60116d..70c568d 100644 --- a/src/server/ast.odin +++ b/src/server/ast.odin @@ -1296,8 +1296,11 @@ build_string_node :: proc(node: ^ast.Node, builder: ^strings.Builder, remove_poi strings.write_string(builder, "bit_set") strings.write_string(builder, "[") build_string(n.elem, builder, remove_pointers) + if n.underlying != nil { + strings.write_string(builder, "; ") + build_string(n.underlying, builder, remove_pointers) + } strings.write_string(builder, "]") - build_string(n.underlying, builder, remove_pointers) case ^Map_Type: strings.write_string(builder, "map") strings.write_string(builder, "[") diff --git a/tests/hover_test.odin b/tests/hover_test.odin index e51d116..bd7abe6 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5312,6 +5312,16 @@ ast_hover_proc_return_with_enum :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.foo :: proc() -> enum{A, B}") } + +@(test) +ast_hover_proc_arg_generic_bit_set :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + f{*}oo :: proc($T: typeid/bit_set[$F; $E]) {} + `, + } + test.expect_hover(t, &source, "test.foo :: proc($T: typeid/bit_set[$F; $E])") +} /* Waiting for odin fix -- cgit v1.2.3