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

pub fn main() u8 {
    var example: Example = .{ .x = 5, .y = 10 };
    _ = &example;
    return example.y + example.x - 15;
}

// run
//