bloat-buster/tests/return_array.bbb
David Gonzalez Martin eb88c61f88
All checks were successful
CI / ci (MinSizeRel, ubuntu-latest) (push) Successful in 34s
CI / ci (Release, ubuntu-latest) (push) Successful in 31s
CI / ci (RelWithDebInfo, ubuntu-latest) (push) Successful in 36s
CI / ci (Debug, ubuntu-latest) (push) Successful in 2m46s
Compile first executable with self-hosted compiler
2025-06-04 21:25:30 -06:00

23 lines
256 B
Plaintext

SomeEnum = enum
{
a,
b,
c,
d,
e,
f,
}
foo = fn () [2]SomeEnum
{
return [ .f, .e ];
}
[export] main = fn [cc(c)] () s32
{
>result = foo();
if (result[0] != .f) #trap();
if (result[1] != .e) #trap();
return 0;
}