# Sema: disable runtime safety checks in comptime blocks · gitcafe/zig

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

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

Visibility: public

Requested revision: fbbf34e563a376ea1654dce827b9194ba7211b3a

Requested commit: fbbf34e563a376ea1654dce827b9194ba7211b3a

Commit: fbbf34e563a376ea1654dce827b9194ba7211b3a

Tree: dc95e30f87d14c2ff3b3784df76ed10327f4425a

Author: mlugg

Committer: mlugg

## Message

```
Sema: disable runtime safety checks in comptime blocks

Sometimes we emit runtime instructions in comptime scopes. These
instructions will be discarded, but they allow comptime blocks to
contain intermediate runtime-known values, which is necessary for
expressions like `runtime_array.len` to work.

Since we will always throw away these runtime instructions, including
safety checks is a time waste at best and trips an assertion at worst!

Resolves: #20064

```

## Parents

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

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