diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-01-27 13:53:35 +0100 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-01-27 13:53:35 +0100 |
| commit | f72c31da801b526e2c0f15e84afee0fdb21ce381 (patch) | |
| tree | d9f00d827e4c05ddc8440f5bee66266ef1491221 /src/analysis | |
| parent | 7e39136c69e8d29b2f1f3f804aa72c6e655a5691 (diff) | |
document links work
Diffstat (limited to 'src/analysis')
| -rw-r--r-- | src/analysis/analysis.odin | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/analysis/analysis.odin b/src/analysis/analysis.odin index b5716e1..5a374a5 100644 --- a/src/analysis/analysis.odin +++ b/src/analysis/analysis.odin @@ -129,7 +129,6 @@ resolve_poly_spec :: proc { }; resolve_poly_spec_array :: proc(ast_context: ^AstContext, call_array: $A/[]^$T, spec_array: $D/[]^$K, poly_map: ^map[string]^ast.Expr) { - if len(call_array) != len(spec_array) { return; } @@ -140,7 +139,6 @@ resolve_poly_spec_array :: proc(ast_context: ^AstContext, call_array: $A/[]^$T, } resolve_poly_spec_dynamic_array :: proc(ast_context: ^AstContext, call_array: $A/[dynamic]^$T, spec_array: $D/[dynamic]^$K, poly_map: ^map[string]^ast.Expr) { - if len(call_array) != len(spec_array) { return; } @@ -151,7 +149,6 @@ resolve_poly_spec_dynamic_array :: proc(ast_context: ^AstContext, call_array: $A } get_poly_node_to_expr :: proc(node: ^ast.Node) -> ^ast.Expr { - using ast; switch v in node.derived { @@ -297,6 +294,10 @@ resolve_type_comp_literal :: proc(ast_context: ^AstContext, position_context: ^D return current_symbol, current_comp_lit, true; } + if current_comp_lit == nil { + return {}, nil, false; + } + element_index := 0; for elem, i in current_comp_lit.elems { |