mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
20 lines
325 B
Zig
20 lines
325 B
Zig
const std = @import("std");
|
|
const builtin = @import("builtin");
|
|
|
|
test {
|
|
const T = @TypeOf(.{ @as(i32, 0), @as(u32, 0) });
|
|
var a: T = .{ 0, 0 };
|
|
_ = &a;
|
|
}
|
|
|
|
test {
|
|
const S = struct {
|
|
comptime x: i32 = 0,
|
|
comptime y: u32 = 0,
|
|
};
|
|
var a: S = .{};
|
|
_ = &a;
|
|
var b = S{};
|
|
_ = &b;
|
|
}
|