zig/test/cases/pub_enum/index.zig
Andrew Kelley b581da41f8 remove compiler directives
* 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
2016-09-28 02:33:32 -04:00

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);
}