# sema: add peer type resolution for vectors · gitcafe/zig

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

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

Visibility: public

Requested revision: 505e720421ce4f7ed11730fe68d32e3bba711f3c

Requested commit: 505e720421ce4f7ed11730fe68d32e3bba711f3c

Commit: 505e720421ce4f7ed11730fe68d32e3bba711f3c

Tree: 9bb76c6995902416714832b5506218b8b12a8251

Author: John Schmidt

Committer: John Schmidt

## Message

````
sema: add peer type resolution for vectors

This is consistent with how coercion for vectors work. So now you can do
this:

```
var a: @Vector(2, u16) = .{1, 2};
var b: @Vector(2, u8) = .{2, 1};
const c = @min(a, b);
```

where previously you had to cast explicitly:

```
var a: @Vector(2, u16) = .{1, 2};
var b: @Vector(2, u8) = .{2, 1};
var c: @Vector(2, u16) = b;
const c = @min(a, c);
```

````

## Parents

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

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