diff options
| author | Cody Tapscott <topolarity@tapscott.me> | 2022-02-27 01:19:02 -0700 |
|---|---|---|
| committer | Cody Tapscott <topolarity@tapscott.me> | 2022-02-27 02:24:28 -0700 |
| commit | a7a508fcd9a961ea9d903f9065556a02b4045b95 (patch) | |
| tree | 32a18d391650f39f4b67bf679fc213b2446a6b21 /test/behavior/eval.zig | |
| parent | b52948444f16c082f0e29bb75b246370c4b11326 (diff) | |
| download | zig-a7a508fcd9a961ea9d903f9065556a02b4045b95.tar.gz zig-a7a508fcd9a961ea9d903f9065556a02b4045b95.zip | |
stage2 sema: Implement comptime result for comparison of uint to comptime value
This adds a comptime result when comparing a comptime value to an
unsigned integer. For example:
( 0 <= (unsigned runtime value)) => true
(-1 < (unsigned runtime value)) => true
((unsigned runtime value) < -15) => false
Diffstat (limited to 'test/behavior/eval.zig')
| -rw-r--r-- | test/behavior/eval.zig | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/behavior/eval.zig b/test/behavior/eval.zig index c7b5b016b4..9832cd2161 100644 --- a/test/behavior/eval.zig +++ b/test/behavior/eval.zig @@ -559,8 +559,6 @@ fn modifySomeBytes(bytes: []u8) void { } test "comparisons 0 <= uint and 0 > uint should be comptime" { - if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO - testCompTimeUIntComparisons(1234); } fn testCompTimeUIntComparisons(x: u32) void { |
