zig
zig copied to clipboard
Zig often fails to compile successfully but does not report an error
Zig Version
0.10.0-dev.4476+0f0076666
Steps to Reproduce
const std = @import("std");
pub fn main() !void {
std.debug.print("begin...\n", .{});
std.debug.print("{}\n", .{std.mem.bytesToValue(usize, &[_]u8{ 49, 48, 48 })}); //not work
std.debug.print("{!}\n", .{std.fmt.parseInt(usize, &[_]u8{ 49, 48, 48 }, 0)}); //work
}
Expected Behavior
std.debug.print("{}\n", .{std.mem.bytesToValue(usize, &[_]u8{ 49, 48, 48 })}); //not work Compilation failed with error
Actual Behavior
std.debug.print("{}\n", .{std.mem.bytesToValue(usize, &[_]u8{ 49, 48, 48 })}); //not work Compilation failed without any error
Zig often fails to compile successfully but does not report an error, why?