mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 17:13:19 +00:00
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`, `setFnNoInline` builtin functions to replace previous directive functionality * add `coldcc` and `nakedcc` as keywords which can be used as part of a function prototype. * `setDebugSafety` builtin can be used to set debug safety features at a per block scope level. * closes #169
20 lines
343 B
Zig
20 lines
343 B
Zig
const assert = @import("std").debug.assert;
|
|
const other = @import("other.zig");
|
|
|
|
fn pubEnum() {
|
|
@setFnTest(this, true);
|
|
|
|
pubEnumTest(other.APubEnum.Two);
|
|
}
|
|
fn pubEnumTest(foo: other.APubEnum) {
|
|
assert(foo == other.APubEnum.Two);
|
|
}
|
|
|
|
fn castWithImportedSymbol() {
|
|
@setFnTest(this, true);
|
|
|
|
assert(other.size_t(42) == 42);
|
|
}
|
|
|
|
|