# Sema: allow comptime blocks for global assembly · gitcafe/zig

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

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

Visibility: public

Requested revision: 633fe41a2c2310d8cfab53ee9d87bb50ac4efc41

Requested commit: 633fe41a2c2310d8cfab53ee9d87bb50ac4efc41

Commit: 633fe41a2c2310d8cfab53ee9d87bb50ac4efc41

Tree: 131d009bf31145ed8185f3a9fd4d7914de361a35

Author: Daniele Cocca

Committer: Veikka Tuominen

## Message

```
Sema: allow comptime blocks for global assembly

An assembly expression in a comptime block is legal Zig in the case of
global assembly [^1]. Instead of unconditionally asserting that the
expression lives in a runtime block, here we assert that if the
expression lives in a comptime block it must be outside of function
scope.

[^1]: https://ziglang.org/documentation/0.9.1/#Global-Assembly

```

## Parents

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

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