From e90a29ed4682530243e10ae91e880ed2eeba4dfd Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Thu, 11 Sep 2025 21:12:31 -0400 Subject: Correctly resolve go to definition for nested using bitfields on structs --- src/server/symbol.odin | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/server/symbol.odin') diff --git a/src/server/symbol.odin b/src/server/symbol.odin index 3d176f1..f140694 100644 --- a/src/server/symbol.odin +++ b/src/server/symbol.odin @@ -378,7 +378,6 @@ write_struct_type :: proc( v: ^ast.Struct_Type, attributes: []^ast.Attribute, base_using_index: int, - inlined := false, ) { b.poly = v.poly_params // We clone this so we don't override docs and comments with temp allocated docs and comments @@ -542,7 +541,7 @@ expand_usings :: proc(ast_context: ^AstContext, b: ^SymbolStructValueBuilder) { if ident, ok := derived.(^ast.Ident); ok { if v, ok := struct_type_from_identifier(ast_context, ident^); ok { - write_struct_type(ast_context, b, v, {}, u, true) + write_struct_type(ast_context, b, v, {}, u) } else { clear(&ast_context.recursion_map) if symbol, ok := resolve_type_identifier(ast_context, ident^); ok { @@ -563,6 +562,12 @@ expand_usings :: proc(ast_context: ^AstContext, b: ^SymbolStructValueBuilder) { } } else if v, ok := derived.(^ast.Struct_Type); ok { write_struct_type(ast_context, b, v, {}, u) + } else if v, ok := derived.(^ast.Bit_Field_Type); ok { + if symbol, ok := resolve_type_expression(ast_context, field_expr); ok { + if v, ok := symbol.value.(SymbolBitFieldValue); ok { + write_symbol_bitfield_value(ast_context, b, v, u) + } + } } delete_key(&ast_context.recursion_map, b.types[u]) } -- cgit v1.2.3