chore: init from code-review-graph-main snapshot (v2.3.7)

This commit is contained in:
dev
2026-08-05 13:16:12 +08:00
commit 82b7c6dc9e
358 changed files with 118525 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
const std = @import("std");
const util = @import("./sample_zig_util.zig");
pub fn main() !void {
std.debug.print("hello\n", .{});
const x = helper(2);
_ = x;
util.noop();
}
fn helper(x: i32) i32 {
return x + 1;
}
pub const Point = struct {
x: i32,
y: i32,
pub fn init(x: i32, y: i32) Point {
return .{ .x = x, .y = y };
}
pub fn distance(self: Point, other: Point) f32 {
_ = other;
return @intCast(helper(self.x));
}
};
const Color = enum { red, green, blue };
pub const Shape = union(enum) {
circle: f32,
square: f32,
};
test "helper increments" {
try expect(helper(1) == 2);
}