authorgravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2019-04-09 15:00:53-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-05-29 20:21:07-04:00
log4188faeac56d9c022fa33449aa4283b1f55395cf
tree08c4597b591291362921fa705ce114175de65f05
parent4e1f3a9ba35530f129e43e11ac0676c562e4cb98

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.

1 files changed, 1 insertions(+), 1 deletions(-)

src/ir.cpp+1-1
......@@ -18507,7 +18507,7 @@ static Error ir_make_type_info_defs(IrAnalyze *ira, IrInstruction *source_instr,
1850718507 return ErrorSemanticAnalyzeFail;
1850818508 }
1850918509
18510 AstNodeFnProto *fn_node = (AstNodeFnProto *)(fn_entry->proto_node);
18510 AstNodeFnProto *fn_node = &fn_entry->proto_node->data.fn_proto;
1851118511
1851218512 ConstExprValue *fn_def_val = create_const_vals(1);
1851318513 fn_def_val->special = ConstValSpecialStatic;