diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-03-18 15:20:52 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-03-18 15:20:52 +0100 |
| commit | ff6d5c9bdd1646ea950f1d6571263797a8650c2e (patch) | |
| tree | f7e0a5f74dd89a61882d15fbf9eea672f862339b /src/server/analysis.odin | |
| parent | 207fe98a46b28297755608904dbf08d06fc50970 (diff) | |
Fix issues with bitsets in procedures not completing correctly
Diffstat (limited to 'src/server/analysis.odin')
| -rw-r--r-- | src/server/analysis.odin | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index e3857c1..45e2e74 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1698,13 +1698,10 @@ resolve_comp_literal :: proc( } else if position_context.call != nil { if call_expr, ok := position_context.call.derived.(^ast.Call_Expr); ok { - arg_index := 0 - for arg, i in call_expr.args { - if position_in_node(arg, position_context.position) { - arg_index = i - break - } - } + arg_index := find_position_in_call_param( + position_context, + call_expr^, + ) or_return symbol = resolve_type_expression( ast_context, @@ -1728,6 +1725,9 @@ resolve_comp_literal :: proc( } } + old_package := ast_context.current_package + ast_context.current_package = symbol.pkg + symbol, _ = resolve_type_comp_literal( ast_context, position_context, @@ -1735,6 +1735,8 @@ resolve_comp_literal :: proc( position_context.parent_comp_lit, ) or_return + ast_context.current_package = old_package + return symbol, true } |