mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
19 lines
475 B
Zig
19 lines
475 B
Zig
const builtin = @import("builtin");
|
|
const Foo = struct {
|
|
usingnamespace Mixin;
|
|
};
|
|
|
|
const Mixin = struct {
|
|
pub fn two(self: Foo) void {
|
|
_ = self;
|
|
}
|
|
};
|
|
|
|
test "container member access usingnamespace decls" {
|
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
|
var foo = Foo{};
|
|
foo.two();
|
|
}
|