-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Zig Version
0.14.0
Steps to Reproduce and Observed Behavior
λ cat main.zig
const std = @import("std");
const assert = std.debug.assert;
pub fn main() void {
const x: u64 = ~0;
assert(x == std.math.maxInt(u64));
}
matklad@TigerMac ~/p/tb/work (matklad/fix-assert *)
λ ~/zig-0.14/zig run main.zig
main.zig:5:20: error: unable to perform binary not operation on type 'comptime_int'
const x: u64 = ~0;
Expected Behavior
Program exists with zero.
silver-signal and johan0A
Metadata
Metadata
Assignees
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.