# Sema: fix @intToPtr of zero value to optional pointer · gitcafe/zig

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

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

Visibility: public

Requested revision: 11d0dfb8829f7a247b21b417157bafeebd6a2a90

Requested commit: 11d0dfb8829f7a247b21b417157bafeebd6a2a90

Commit: 11d0dfb8829f7a247b21b417157bafeebd6a2a90

Tree: f78e3fe50d8d691196cfdddc11a7f8988c5cc3c0

Author: mlugg

Committer: Andrew Kelley

## Message

```
Sema: fix @intToPtr of zero value to optional pointer

Calling into coercion logic here is a little opaque, and more to the
point wholly unnecessary. Instead, the (very short) logic is now
implemented directly in Sema.

Resolves: #16033

```

## Parents

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

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