summaryrefslogtreecommitdiff
path: root/example-container/main.zig
blob: 9020adbcba56355b359e8d48fead3a0e9283e716 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const Object = @import("Object.zig");

const Moose = struct {
    foo: i32,

    fn dump(self: Moose) void {
        const print = @import("std").debug.print;
        print("Self = {s}\n", .{@typeName(Moose)});
        print("FOO = {}\n", .{self.foo});
    }
};

pub fn main() void {
    const o12 = Object.init(12);
    const o13 = Object.init(13);
    o12.dump();
    o13.dump();

    const m = Moose{ .foo = 42 };
    m.dump();
}