aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-02 14:55:01 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-02 14:55:01 -0500
commit2b88441295d39d3e988c0771b6ad64531948ff0a (patch)
tree2b812b9985642b79eeb56e1018a4266cfa916f7a /src/ir.cpp
parentb78c91951a1db34c615a011e0444608285f1a74c (diff)
downloadzig-2b88441295d39d3e988c0771b6ad64531948ff0a.tar.gz
zig-2b88441295d39d3e988c0771b6ad64531948ff0a.zip
fix behavior when initializing struct with undefined
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 85afc93245..b0908dd7cf 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6352,7 +6352,7 @@ static IrInstruction *ir_analyze_undefined_to_anything(IrAnalyze *ira, IrInstruc
{
IrInstruction *result = ir_create_const(&ira->new_irb, source_instr->scope,
source_instr->source_node, wanted_type, target->value.depends_on_compile_var);
- init_const_undefined(&result->value);
+ init_const_undefined(ira->codegen, &result->value);
return result;
}