diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-09-03 16:08:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-20 18:33:00 -0700 |
| commit | 426af68b7d234bceba029d65f3388ad2376da649 (patch) | |
| tree | f52425484ae66d4cbd636a60a86b1bf91478f0c2 /test/behavior/math.zig | |
| parent | 14bda4130a9a7f8b529b12bc74a1d6caa71b9545 (diff) | |
| download | zig-426af68b7d234bceba029d65f3388ad2376da649.tar.gz zig-426af68b7d234bceba029d65f3388ad2376da649.zip | |
compiler: require comptime vector indexes
Diffstat (limited to 'test/behavior/math.zig')
| -rw-r--r-- | test/behavior/math.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/behavior/math.zig b/test/behavior/math.zig index 914c47ba69..5e844af619 100644 --- a/test/behavior/math.zig +++ b/test/behavior/math.zig @@ -140,8 +140,7 @@ fn expectVectorsEqual(a: anytype, b: anytype) !void { const len_b = @typeInfo(@TypeOf(b)).vector.len; try expect(len_a == len_b); - var i: usize = 0; - while (i < len_a) : (i += 1) { + inline for (0..len_a) |i| { try expect(a[i] == b[i]); } } |
