# fix structs that contain types which require comptime · gitcafe/zig

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

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

Visibility: public

Requested revision: 31aefa6a2179dfae752020195fb193c6333bae7e

Requested commit: 31aefa6a2179dfae752020195fb193c6333bae7e

Commit: 31aefa6a2179dfae752020195fb193c6333bae7e

Tree: 3bf77a35c39424e736da020a0451d6fe32d7648b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix structs that contain types which require comptime

Now, if a struct has any fields which require comptime,
such as `type`, then the struct is marked as requiring
comptime as well. Same goes for unions.

This means that a function will implicitly be called
at comptime if the return type is a struct which contains
a field of type `type`.

closes #586

```

## Parents

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

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