diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-01-04 23:21:33 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-01-04 23:21:33 -0500 |
| commit | c32a060d4fd432002d32ff17a4cf9ae491cddfc0 (patch) | |
| tree | e7754a644be63c3922d68b1bc67b6c2e5cf424d9 /src/analyze.cpp | |
| parent | 664b41af65d3c9bbc8e09ffcaa91d404fe87d7a0 (diff) | |
| download | zig-c32a060d4fd432002d32ff17a4cf9ae491cddfc0.tar.gz zig-c32a060d4fd432002d32ff17a4cf9ae491cddfc0.zip | |
IR: add unreachable code compiler error
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 155b83d997..bdcca2f780 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2620,6 +2620,8 @@ bool is_node_void_expr(AstNode *node) { { return true; } + } else if (node->type == NodeTypeBlock && node->data.block.statements.length == 0) { + return true; } return false; |
