# stage2: coerce \[\*:0\]u8 to other valid pointer types · gitcafe/zig

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

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

Visibility: public

Requested revision: bf972e44d5d0ce704cae99957d565c55ea16335d

Requested commit: bf972e44d5d0ce704cae99957d565c55ea16335d

Commit: bf972e44d5d0ce704cae99957d565c55ea16335d

Tree: c709555e4de2eea52d52a6927b0bf0f3c3da6a14

Author: Mitchell Hashimoto

Committer: Veikka Tuominen

## Message

```
stage2: coerce [*:0]u8 to other valid pointer types

This makes the following work properly (as it does in stage1, too):

  var zero_ptr: [*:0]const u8 = undefined;
  var no_zero_ptr: [*]const u8 = zero_ptr;

Prior to this this would fail with an "expected type" error since
coercion failed.

```

## Parents

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

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