aboutsummaryrefslogtreecommitdiff
path: root/test/cases/structs.4.zig
blob: 2d37446c5692f49b68d0de55488e995b1011e075 (plain)
1
2
3
4
5
6
7
8
9
10
11
const Example = struct { x: u8, y: u8 };

pub fn main() u8 {
    var example: Example = .{ .x = 5, .y = 10 };

    example = .{ .x = 10, .y = 20 };
    return example.y + example.x - 30;
}

// run
//