All checks were successful
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Successful in 34s
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 31s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Successful in 36s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 2m28s
CI / ci (MinSizeRel, ubuntu-latest) (push) Successful in 33s
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 2m29s
23 lines
276 B
Plaintext
23 lines
276 B
Plaintext
SomeEnum = enum
|
|
{
|
|
a,
|
|
b,
|
|
c,
|
|
d,
|
|
}
|
|
|
|
foo = fn (arg: SomeEnum) SomeEnum
|
|
{
|
|
return arg;
|
|
}
|
|
|
|
[export] main = fn [cc(c)] () s32
|
|
{
|
|
>some_e: SomeEnum = .c;
|
|
>a = foo(some_e);
|
|
>b = foo(.d);
|
|
if (a != .c) #trap();
|
|
if (b != .d) #trap();
|
|
return 0;
|
|
}
|