# stage2: avoid calling freeDecl when hasCodeGenBits == false · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3697022a41ffa13a3971aeaf96b9c2b8de391ab1)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3697022a41ffa13a3971aeaf96b9c2b8de391ab1

Requested commit: 3697022a41ffa13a3971aeaf96b9c2b8de391ab1

Commit: 3697022a41ffa13a3971aeaf96b9c2b8de391ab1

Tree: 94e7a23c262fcb7b0427437502c72a845769b980

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: avoid calling freeDecl when hasCodeGenBits == false

Previously the frontend incorrectly called freeDecl for structs, which
never got allocateDecl called for them. There was simply a missing check
for hasCodeGenBits().

```

## Parents

- [d83983527323201c44f90a2f57ff58c746116e11](https://git.cafe/gitcafe/zig/commit/d83983527323201c44f90a2f57ff58c746116e11?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3697022a41ffa13a3971aeaf96b9c2b8de391ab1?format=markdown)
