mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-22 05:34:59 -07:00
Fix anonymous procedures
This commit is contained in:
+1
-1
@@ -1578,7 +1578,7 @@ void ir_emit_zero_init(irProcedure *p, irValue *address, Ast *expr) {
|
||||
args[0] = ir_emit_conv(p, address, t_rawptr);
|
||||
args[1] = ir_const_int(a, type_size_of(t));
|
||||
AstPackage *pkg = get_core_package(p->module->info, str_lit("mem"));
|
||||
if (p->entity->token.string != "zero" && p->entity->pkg != pkg) {
|
||||
if (p->entity != nullptr && p->entity->token.string != "zero" && p->entity->pkg != pkg) {
|
||||
ir_emit_package_call(p, "mem", "zero", args, expr);
|
||||
}
|
||||
ir_emit(p, ir_instr_zero_init(p, address));
|
||||
|
||||
@@ -4292,6 +4292,9 @@ bool parse_file(Parser *p, AstFile *f) {
|
||||
CommentGroup *docs = f->lead_comment;
|
||||
|
||||
f->package_token = expect_token(f, Token_package);
|
||||
if (f->error_count > 0) {
|
||||
return false;
|
||||
}
|
||||
Token package_name = expect_token_after(f, Token_Ident, "package");
|
||||
if (package_name.kind == Token_Ident) {
|
||||
if (package_name.string == "_") {
|
||||
|
||||
Reference in New Issue
Block a user