# AstGen: add error for invalid string comparisons · gitcafe/zig

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

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

Visibility: public

Requested revision: e2509ddbe69a56bb1f4a56b46946b2a706d5aabe

Requested commit: e2509ddbe69a56bb1f4a56b46946b2a706d5aabe

Commit: e2509ddbe69a56bb1f4a56b46946b2a706d5aabe

Tree: 109fc0748d4e735b8a0624907bfb0610c06d8301

Author: Veikka Tuominen

Committer: Veikka Tuominen

## Message

```
AstGen: add error for invalid string comparisons

These operations are allowed because the string literals are just
pointers but they produce unexpected results. These errors prevent
beginners from shooting themselves in the foot while still allowing
advanced users to circumvent them if they desire to do so.

Closes #8290

```

## Parents

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

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