# AstGen: fix loop control flow applying to wrong loop · gitcafe/zig

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

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

Visibility: public

Requested revision: fad95741db7529bbad873fb330c25d64ac765340

Requested commit: fad95741db7529bbad873fb330c25d64ac765340

Commit: fad95741db7529bbad873fb330c25d64ac765340

Tree: 22ca663d66d22bccc6ffe9ac0d2c676ed8bb0636

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
AstGen: fix loop control flow applying to wrong loop

In the case of 'continue' or 'break' inside the 'else' block of a
'while' or 'for' loop.

Closes #12109

```

## Parents

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

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