| author | |
| committer | |
| log | ca180d3f02914d282505752a1d2fe08e175f9d99 |
| tree | 07205165370989989e32b2db75eb943dea24556f |
| parent | f7173f4f081bdc200732cc9f7d58d3d54f9b0205 |
fixes padding in printf
See #2583 files changed, 4 insertions(+), 4 deletions(-)
src/analyze.cpp+1-1| ... | @@ -3302,7 +3302,7 @@ bool ir_get_var_is_comptime(VariableTableEntry *var) { | ... | @@ -3302,7 +3302,7 @@ bool ir_get_var_is_comptime(VariableTableEntry *var) { |
| 3302 | } | 3302 | } |
| 3303 | 3303 | ||
| 3304 | bool const_values_equal(ConstExprValue *a, ConstExprValue *b) { | 3304 | bool const_values_equal(ConstExprValue *a, ConstExprValue *b) { |
| 3305 | assert(a->type == b->type); | 3305 | assert(a->type->id == b->type->id); |
| 3306 | assert(a->special == ConstValSpecialStatic); | 3306 | assert(a->special == ConstValSpecialStatic); |
| 3307 | assert(b->special == ConstValSpecialStatic); | 3307 | assert(b->special == ConstValSpecialStatic); |
| 3308 | switch (a->type->id) { | 3308 | switch (a->type->id) { |
std/io.zig+1-1| ... | @@ -469,7 +469,7 @@ pub const InStream = struct { | ... | @@ -469,7 +469,7 @@ pub const InStream = struct { |
| 469 | } | 469 | } |
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | pub fn parseUnsigned(comptime T: type, buf: []u8, radix: u8) -> %T { | 472 | pub fn parseUnsigned(comptime T: type, buf: []const u8, radix: u8) -> %T { |
| 473 | var x: T = 0; | 473 | var x: T = 0; |
| 474 | 474 | ||
| 475 | for (buf) |c| { | 475 | for (buf) |c| { |
test/run_tests.cpp+2-2| ... | @@ -319,9 +319,9 @@ pub const b_text = a_text; | ... | @@ -319,9 +319,9 @@ pub const b_text = a_text; |
| 319 | const io = @import("std").io; | 319 | const io = @import("std").io; |
| 320 | 320 | ||
| 321 | pub fn main(args: [][]u8) -> %void { | 321 | pub fn main(args: [][]u8) -> %void { |
| 322 | %%io.stdout.printf("Hello, world!\n"); | 322 | %%io.stdout.printf("Hello, world!\n{d4} {x3}\n", u32(12), u16(0x12)); |
| 323 | } | 323 | } |
| 324 | )SOURCE", "Hello, world!\n"); | 324 | )SOURCE", "Hello, world!\n0012 012\n"); |
| 325 | 325 | ||
| 326 | 326 | ||
| 327 | add_simple_case_libc("number literals", R"SOURCE( | 327 | add_simple_case_libc("number literals", R"SOURCE( |