# ability to cast explicitly from int to enum · gitcafe/zig

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

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

Visibility: public

Requested revision: 49a4b1b9309de06f7a359836788dfff447003f1b

Requested commit: 49a4b1b9309de06f7a359836788dfff447003f1b

Commit: 49a4b1b9309de06f7a359836788dfff447003f1b

Tree: 4ee4ce61cf93e17f0b6cdcbfd35a0935995897ee

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
ability to cast explicitly from int to enum

This commit also fixes a bug where pure functions are marked with
the read-only attribute in debug mode. This resulted in incorrect
codegen because calls to read-only functions with unused values
were not generated.

For example, a call to assert() would not be generated if assert
is marked with read-only. Which it *is* marked with in release
mode.

```

## Parents

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

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