aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/math.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-09-03 16:08:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-09-20 18:33:00 -0700
commit426af68b7d234bceba029d65f3388ad2376da649 (patch)
treef52425484ae66d4cbd636a60a86b1bf91478f0c2 /test/behavior/math.zig
parent14bda4130a9a7f8b529b12bc74a1d6caa71b9545 (diff)
downloadzig-426af68b7d234bceba029d65f3388ad2376da649.tar.gz
zig-426af68b7d234bceba029d65f3388ad2376da649.zip
compiler: require comptime vector indexes
Diffstat (limited to 'test/behavior/math.zig')
-rw-r--r--test/behavior/math.zig3
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]);
}
}