# type_has_one_possible_value takes comptime struct fields into account · gitcafe/zig

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

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

Visibility: public

Requested revision: e2dc63644ab3d8e5cdaec2d58dc57c587295081f

Requested commit: e2dc63644ab3d8e5cdaec2d58dc57c587295081f

Commit: e2dc63644ab3d8e5cdaec2d58dc57c587295081f

Tree: 776b9916ec8911cee97f7992e7255acf6331fc70

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
type_has_one_possible_value takes comptime struct fields into account

Before, type_has_one_possible_value would return false for the value
`.{1}`. But actually, that type is a tuple with a single comptime field.
Such a type, in fact, has one possible value.

This plus the corresponding adjustment to get_the_one_possible_value
solves #3878.

```

## Parents

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

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