aboutsummaryrefslogtreecommitdiff
path: root/src/server/analysis.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-13 17:49:21 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-13 19:24:13 -0400
commitab0ff1ba4fd3e35e330deb6979c5c1aa75907a98 (patch)
tree95fe85408d8c6592f7c8c3d14dd6fe6a66474e1f /src/server/analysis.odin
parent023c8a0fd1d8d8e54b38bf990a74816a31dee68e (diff)
Improve resolution of comp literals
Diffstat (limited to 'src/server/analysis.odin')
-rw-r--r--src/server/analysis.odin8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 1a7e4a7..b2ab4f2 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -211,6 +211,14 @@ resolve_type_comp_literal :: proc(
^ast.Comp_Lit,
bool,
) {
+ // If the symbol is a MultiPointerValue, we retrieve the symbol of the underlying expression and
+ // retry with that.
+ if s, ok := current_symbol.value.(SymbolMultiPointerValue); ok {
+ if symbol, ok := resolve_type_expression(ast_context, s.expr); ok {
+ return resolve_type_comp_literal(ast_context, position_context, symbol, current_comp_lit)
+ }
+ }
+
if position_context.comp_lit == current_comp_lit {
return current_symbol, current_comp_lit, true
} else if current_comp_lit == nil {