diff --git a/src/analyze.cpp b/src/analyze.cpp index 53004d402e..9a65479e49 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3302,7 +3302,7 @@ bool ir_get_var_is_comptime(VariableTableEntry *var) { } bool const_values_equal(ConstExprValue *a, ConstExprValue *b) { - assert(a->type == b->type); + assert(a->type->id == b->type->id); assert(a->special == ConstValSpecialStatic); assert(b->special == ConstValSpecialStatic); switch (a->type->id) { diff --git a/std/io.zig b/std/io.zig index 1befeb6dd2..05bbba1bea 100644 --- a/std/io.zig +++ b/std/io.zig @@ -469,7 +469,7 @@ pub const InStream = struct { } }; -pub fn parseUnsigned(comptime T: type, buf: []u8, radix: u8) -> %T { +pub fn parseUnsigned(comptime T: type, buf: []const u8, radix: u8) -> %T { var x: T = 0; for (buf) |c| { diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 828f3469bf..1c282a8978 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -319,9 +319,9 @@ pub const b_text = a_text; const io = @import("std").io; pub fn main(args: [][]u8) -> %void { - %%io.stdout.printf("Hello, world!\n"); + %%io.stdout.printf("Hello, world!\n{d4} {x3}\n", u32(12), u16(0x12)); } - )SOURCE", "Hello, world!\n"); + )SOURCE", "Hello, world!\n0012 012\n"); add_simple_case_libc("number literals", R"SOURCE(