diff options
| author | John Schmidt <john.schmidt.h@gmail.com> | 2023-03-08 17:49:52 +0100 |
|---|---|---|
| committer | John Schmidt <john.schmidt.h@gmail.com> | 2023-03-09 00:55:17 +0100 |
| commit | 505e720421ce4f7ed11730fe68d32e3bba711f3c (patch) | |
| tree | 9bb76c6995902416714832b5506218b8b12a8251 /lib/std/Build/RunStep.zig | |
| parent | 06b263825a67e68cec128c640a6287fa1716dc63 (diff) | |
| download | zig-505e720421ce4f7ed11730fe68d32e3bba711f3c.tar.gz zig-505e720421ce4f7ed11730fe68d32e3bba711f3c.zip | |
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);
```
Diffstat (limited to 'lib/std/Build/RunStep.zig')
0 files changed, 0 insertions, 0 deletions
