# Sema: add missing compile error for runtime-known const with comptime-only type · gitcafe/zig

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

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

Visibility: public

Requested revision: 50ef10eb4963167225f7153dc5165292dbac0046

Requested commit: 50ef10eb4963167225f7153dc5165292dbac0046

Commit: 50ef10eb4963167225f7153dc5165292dbac0046

Tree: d6cb9b5028c9b38f867c648fef7c16299fab4990

Author: mlugg

Committer: mlugg

## Message

```
Sema: add missing compile error for runtime-known const with comptime-only type

When RLS is used to initialize a value with a comptime-only type, the
usual "value with comptime-only type depends on runtime control flow"
error message isn't hit, because we don't use results from a block. When
we reach `make_ptr_const`, we must validate that the value is
comptime-known.

```

## Parents

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

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