bloat-buster/tests/basic_switch.bbb
David Gonzalez Martin b7aaa12f61
All checks were successful
CI / ci (ReleaseFast, ubuntu-latest) (pull_request) Successful in 1m57s
CI / ci (ReleaseSmall, ubuntu-latest) (pull_request) Successful in 1m56s
CI / ci (ReleaseSafe, ubuntu-latest) (pull_request) Successful in 2m2s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 3m10s
CI / ci (ReleaseFast, ubuntu-latest) (push) Successful in 2m0s
CI / ci (ReleaseSafe, ubuntu-latest) (push) Successful in 2m7s
CI / ci (ReleaseSmall, ubuntu-latest) (push) Successful in 1m55s
CI / ci (Debug, ubuntu-latest) (push) Successful in 3m6s
Basic switch
2025-04-15 11:01:34 -06:00

27 lines
303 B
Plaintext

E = enum
{
a,
b,
c,
}
[export] main = fn [cc(c)] () s32
{
>some_enum: E = .a;
switch (some_enum)
{
.a =>
{
return 0;
},
.b =>
{
return 1;
},
.c =>
{
return 1;
},
}
}