# AstGen: do not allow unlabeled \`break\` to exit a labeled switch · gitcafe/zig

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

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

Visibility: public

Requested revision: 03c363300fd829f3a656c6a9854a9c9720c9b3f1

Requested commit: 03c363300fd829f3a656c6a9854a9c9720c9b3f1

Commit: 03c363300fd829f3a656c6a9854a9c9720c9b3f1

Tree: 9cf60f26f2d44e9527fac310102fdb80e085d100

Author: mlugg

Committer: Matthew Lugg

## Message

```
AstGen: do not allow unlabeled `break` to exit a labeled switch

`break`ing from something which isn't a loop should always be opt-in.
This was a bug in #21257.

```

## Parents

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

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