# Sema: don't allow undef values through resolveDefinedValue in typeof block · gitcafe/zig

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

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

Visibility: public

Requested revision: f2814caaf04fc041a028d5ede4fb4db5ee2f19ae

Requested commit: f2814caaf04fc041a028d5ede4fb4db5ee2f19ae

Commit: f2814caaf04fc041a028d5ede4fb4db5ee2f19ae

Tree: 50dfaa41d3118225cf1d3da6b31d637e657792bf

Author: mlugg

Committer: mlugg

## Message

```
Sema: don't allow undef values through resolveDefinedValue in typeof block

This logic is not correct in most cases. If any instruction needs to
operate with different semantics within `@TypeOf`, it should be made to
do so explicitly.

This broke a line in `std.mem`: I have opted to fix this in std for now,
since as far as I know it's not yet been discussed which operations (if
any) should be special-cased like this within `@TypeOf`.

```

## Parents

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

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