# Sema: allow runtime only instructions to be emitted in outside functions · gitcafe/zig

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

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

Visibility: public

Requested revision: 34e4b07d0c3cafd0aad15b217e8c56ab9af5de40

Requested commit: 34e4b07d0c3cafd0aad15b217e8c56ab9af5de40

Commit: 34e4b07d0c3cafd0aad15b217e8c56ab9af5de40

Tree: dd705ac25d93cdaa0d2aadfac0c2cfba9e670262

Author: Veikka Tuominen

Committer: Veikka Tuominen

## Message

```
Sema: allow runtime only instructions to be emitted in outside functions

It is possible to get comptime-known values from runtime-known values
for example the length of array. Allowing runtime only instructions to
be emitted outside function bodies allows these operations to happen.
In places where comptime-known values are required we have other methods
to ensure that and they usually result in more specific compile errors too.

Closes #12240

```

## Parents

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

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