Created
May 21, 2022 18:13
-
-
Save mikdusan/c7c811872af9531f7094046d229633f6 to your computer and use it in GitHub Desktop.
@Minimum self-hosted vs stage1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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