Skip to content

Commit

Permalink
Merge pull request #5612 from 9rnsr/fix15855
Browse files Browse the repository at this point in the history
Issue 15855 - "a[{for" causes dmd to segfault
  • Loading branch information
dnadlinger committed Mar 31, 2016
2 parents 2d59f2e + 8577771 commit c2276c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hdrgen.d
Expand Up @@ -235,7 +235,8 @@ public:
buf.writeByte('{');
buf.writenl();
buf.level++;
s._body.accept(this);
if (s._body)
s._body.accept(this);
buf.level--;
buf.writeByte('}');
buf.writenl();
Expand Down
3 changes: 3 additions & 0 deletions test/fail_compilation/ice15855.d
@@ -0,0 +1,3 @@
// REQUIRED_ARGS: -o-

a[{for

0 comments on commit c2276c7

Please sign in to comment.