diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-30 12:18:44 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-30 12:18:44 -0400 |
| commit | 72e564940b4c08598b7f0da78e0df586b58861e0 (patch) | |
| tree | cc475bdef8b8b5dab1375e8b303e28f6a6b9a825 /src/server/generics.odin | |
| parent | 97e83b6c825b451c44bdee207e9521bf2cc9c7a5 (diff) | |
Add parapoly information to union documentation
Diffstat (limited to 'src/server/generics.odin')
| -rw-r--r-- | src/server/generics.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/generics.odin b/src/server/generics.odin index 2cb1f5c..1802efb 100644 --- a/src/server/generics.odin +++ b/src/server/generics.odin @@ -787,9 +787,11 @@ resolve_poly_union :: proc(ast_context: ^AstContext, poly_params: ^ast.Field_Lis i := 0 poly_map := make(map[string]^ast.Expr, 0, context.temp_allocator) + poly_names := make([dynamic]string, 0, context.temp_allocator) for param in poly_params.list { for name in param.names { + append(&poly_names, node_to_string(name)) if len(ast_context.call.args) <= i { break } @@ -801,9 +803,11 @@ resolve_poly_union :: proc(ast_context: ^AstContext, poly_params: ^ast.Field_Lis if poly, ok := param.type.derived.(^ast.Typeid_Type); ok { if ident, ok := name.derived.(^ast.Ident); ok { poly_map[ident.name] = ast_context.call.args[i] + poly_names[i] = node_to_string(ast_context.call.args[i]) } else if poly, ok := name.derived.(^ast.Poly_Type); ok { if poly.type != nil { poly_map[poly.type.name] = ast_context.call.args[i] + poly_names[i] = node_to_string(ast_context.call.args[i]) } } } @@ -831,4 +835,6 @@ resolve_poly_union :: proc(ast_context: ^AstContext, poly_params: ^ast.Field_Lis } } } + + symbol_value.poly_names = poly_names[:] } |