All checks were successful
CI / ci (ReleaseFast, ubuntu-latest) (pull_request) Successful in 2m3s
CI / ci (ReleaseSmall, ubuntu-latest) (pull_request) Successful in 2m3s
CI / ci (ReleaseSafe, ubuntu-latest) (pull_request) Successful in 2m7s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 3m12s
CI / ci (ReleaseFast, ubuntu-latest) (push) Successful in 2m2s
CI / ci (ReleaseSmall, ubuntu-latest) (push) Successful in 2m0s
CI / ci (ReleaseSafe, ubuntu-latest) (push) Successful in 2m7s
CI / ci (Debug, ubuntu-latest) (push) Successful in 3m10s
37 lines
370 B
Plaintext
37 lines
370 B
Plaintext
Foo = enum {
|
|
a,
|
|
b,
|
|
c,
|
|
d,
|
|
e,
|
|
f,
|
|
g,
|
|
}
|
|
|
|
S = struct
|
|
{
|
|
enum: Foo,
|
|
some_boolean: u1,
|
|
}
|
|
|
|
require = fn (ok: u1) void
|
|
{
|
|
if (!ok)
|
|
{
|
|
#trap();
|
|
}
|
|
}
|
|
|
|
[export] main = fn [cc(c)] () s32
|
|
{
|
|
>s: S = {
|
|
.enum = .f,
|
|
.some_boolean = 1,
|
|
};
|
|
|
|
require(s.enum == .f);
|
|
require(s.some_boolean);
|
|
|
|
return 0;
|
|
}
|