# Sema: consider type bounds when refining result type of \`@min\`/\`@max\` · gitcafe/zig

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

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

Visibility: public

Requested revision: c4cc796695dddbfba749514823ed29bda37b7bcd

Requested commit: c4cc796695dddbfba749514823ed29bda37b7bcd

Commit: c4cc796695dddbfba749514823ed29bda37b7bcd

Tree: 8cf201509609767dbe5a8301e4e1e58824576275

Author: mlugg

Committer: Andrew Kelley

## Message

```
Sema: consider type bounds when refining result type of `@min`/`@max`

I achieved this through a major refactor of the logic of analyzeMinMax.
This change should be compatible with vectors of comptime_int, which
Andrew said are supposed to work (but which currently do not).

```

## Parents

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

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