From 1b5e31443062db82337848f112d26ac3a71b80b9 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:44:56 +1100 Subject: Correctly resolve parapoly overloaded procs using bitfields --- src/server/analysis.odin | 2 +- tests/hover_test.odin | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/server/analysis.odin b/src/server/analysis.odin index c9cd863..6d0cf09 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -438,7 +438,7 @@ is_symbol_same_typed :: proc(ast_context: ^AstContext, a, b: Symbol, flags: ast. case SymbolBasicValue: b_value := b.value.(SymbolBasicValue) return a_value.ident.name == b_value.ident.name && a.pkg == b.pkg - case SymbolStructValue, SymbolEnumValue, SymbolUnionValue, SymbolBitSetValue: + case SymbolStructValue, SymbolEnumValue, SymbolUnionValue, SymbolBitSetValue, SymbolBitFieldValue: return a.name == b.name && a.pkg == b.pkg case SymbolSliceValue: b_value := b.value.(SymbolSliceValue) diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 5dc6c91..35c2c4f 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -6075,6 +6075,36 @@ ast_hover_poly_proc_passthrough :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.value: int") } + +@(test) +ast_hover_parapoly_overloaded_proc_with_bitfield :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Entry :: struct($T, $H: typeid) { + handle: H, + } + + SmallHandle :: bit_field int { + valid: bool | 1, + generation: int | 7, + index: int | 24, + } + + make :: proc { + makeEntry, + } + + makeEntry :: proc($T: typeid/Entry($D, $H), handle: H) -> (entry: T) { + return + } + + main :: proc() { + e{*}ntry := make(Entry(int, SmallHandle), SmallHandle{}) + } + `, + } + test.expect_hover(t, &source, "test.entry: test.Entry(int, SmallHandle)") +} /* Waiting for odin fix -- cgit v1.2.3