# fix await on early return when return type is struct · gitcafe/zig

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

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

Visibility: public

Requested revision: 8c39cdc89f2ae7fc25c3856e7c4c6b4662ac8a80

Requested commit: 8c39cdc89f2ae7fc25c3856e7c4c6b4662ac8a80

Commit: 8c39cdc89f2ae7fc25c3856e7c4c6b4662ac8a80

Tree: b47fb874d9e0d351ede0e227a77d98a88dc285a7

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix await on early return when return type is struct

previously, await on an early return would try to access the
destroyed coroutine frame; now it copies the result into a
temporary variable before destroying the coroutine frame

```

## Parents

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

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