Skip to content

Instantly share code, notes, and snippets.

@mikdusan
Created May 21, 2022 18:13
Show Gist options
  • Save mikdusan/c7c811872af9531f7094046d229633f6 to your computer and use it in GitHub Desktop.
Save mikdusan/c7c811872af9531f7094046d229633f6 to your computer and use it in GitHub Desktop.
@Minimum self-hosted vs stage1
[master⋅563-0⋅0-0] tiberius▸ cat z0.zig
const std = @import("std");
pub fn main() !void {
var a: u32 = 0;
var b: i32 = 0;
_ = @minimum(a, b);
}
[master⋅563-0⋅0-0] tiberius▸ _build/stage3/bin/zig build-obj z0.zig
z0.zig:6:21: error: expected u32, found i32
_ = @minimum(a, b);
^
[master⋅563-0⋅0-0] tiberius▸ _build/zig build-obj z0.zig
./z0.zig:6:21: error: expected type 'u32', found 'i32'
_ = @minimum(a, b);
^
./z0.zig:6:21: note: unsigned 32-bit int cannot represent all possible signed 32-bit values
_ = @minimum(a, b);
^
[master⋅563-0⋅0-0] tiberius▸
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment