mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
stage1: AstNodes cannot be casted, but are rather accessed via a union.
Unlike IrInstruction[Foo]s, which all start with:
IrInstruction base;
AstNodes do not work like this, and instead use a pointer to their
specializations. The code assumed otherwise.
This commit is contained in:
parent
4e1f3a9ba3
commit
4188faeac5
@ -18507,7 +18507,7 @@ static Error ir_make_type_info_defs(IrAnalyze *ira, IrInstruction *source_instr,
|
||||
return ErrorSemanticAnalyzeFail;
|
||||
}
|
||||
|
||||
AstNodeFnProto *fn_node = (AstNodeFnProto *)(fn_entry->proto_node);
|
||||
AstNodeFnProto *fn_node = &fn_entry->proto_node->data.fn_proto;
|
||||
|
||||
ConstExprValue *fn_def_val = create_const_vals(1);
|
||||
fn_def_val->special = ConstValSpecialStatic;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user