Skip to content

Commit

Permalink
Fix issues with proc groups not being resolved and causing crashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGavin committed Oct 5, 2024
1 parent 954c876 commit 834ec9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/analysis.odin
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,8 @@ resolve_binary_expression :: proc(ast_context: ^AstContext, binary: ^ast.Binary_
return {}, false
}

set_ast_package_scoped(ast_context)

symbol_a, symbol_b: Symbol
ok_a, ok_b: bool

Expand Down Expand Up @@ -2741,6 +2743,9 @@ get_generic_assignment :: proc(
append(results, ret.default_value)
}
}
} else if aggregate, ok := symbol.value.(SymbolAggregateValue); ok {
//In case we can't resolve the proc group, just save it anyway, so it won't cause any issues further down the line.
append(results, value)
} else if ident, ok := v.expr.derived.(^ast.Ident); ok {
//TODO: Simple assumption that you are casting it the type.
type_ident := new_type(Ident, ident.pos, ident.end, ast_context.allocator)
Expand Down

0 comments on commit 834ec9a

Please sign in to comment.