# Add error for bad cast from \`\*T\` to \`\*\[n\]T\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 9964f1c160acd0bf994708333cd69bc070d6c77e

Requested commit: 9964f1c160acd0bf994708333cd69bc070d6c77e

Commit: 9964f1c160acd0bf994708333cd69bc070d6c77e

Tree: 95038ad8fe5011ad7df08a567e8c3bc545c3532e

Author: InKryption

Committer: Veikka Tuominen

## Message

```
Add error for bad cast from `*T` to `*[n]T`

Casting `*T` to `*[1]T` should still work, but every other length
will now be a compiler error instead of a potential OOB access.

```

## Parents

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

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