Skip to content

Printing temporary value struct #10412

@yrashk

Description

@yrashk

Zig Version

0.10.0-dev.63+6b8e33d14

Steps to Reproduce

const T = struct {
    v: u32,
};

const std = @import("std");

pub fn main() void {
    var t = T{ .v = 222 };
    std.debug.print("{} {}\n", .{ T{ .v = 111 }, t });
}

Expected Behavior

T{ .v = 111 } T{ .v = 222 }  

Actual Behavior

T{ .v = 1 } T{ .v = 222 }  

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions