diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-29 13:21:36 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-29 13:21:36 -0700 |
| commit | d3426ce634a09ec289480510040b3decfbd38c39 (patch) | |
| tree | 7fe7bab9732fdd08b5b87cf96cd2d5a376d367fb /src/AstGen.zig | |
| parent | b613210140f649b11232fae8bad16867d122d0cb (diff) | |
| download | zig-d3426ce634a09ec289480510040b3decfbd38c39.tar.gz zig-d3426ce634a09ec289480510040b3decfbd38c39.zip | |
AstGen: require binary operations to have reachable operands
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index ae66cae662..e132900c68 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -4781,8 +4781,8 @@ fn simpleBinOp( const node_datas = tree.nodes.items(.data); const result = try gz.addPlNode(op_inst_tag, node, Zir.Inst.Bin{ - .lhs = try expr(gz, scope, .none, node_datas[node].lhs), - .rhs = try expr(gz, scope, .none, node_datas[node].rhs), + .lhs = try reachableExpr(gz, scope, .none, node_datas[node].lhs, node), + .rhs = try reachableExpr(gz, scope, .none, node_datas[node].rhs, node), }); return rvalue(gz, rl, result, node); } |
