Files
c3c/test/test_suite/enumerations/const_enum_inline.c3t
Christoffer Lerno acc4a900f5 - New const enum declaration syntax.
- New enum associated value syntax.
2026-02-12 14:43:56 +01:00

22 lines
352 B
Plaintext

// #target: macos-x64
module test;
const enum Foo : inline String
{
HELO = "Helo"
}
fn int main()
{
Foo f = Foo.HELO;
bool b = $defined(String s = Foo.HELO);
bool c = $defined(String s = f);
bool d = $defined(int i = f);
return 0;
}
/* #expect: test.ll
store i8 1, ptr %b, align 1
store i8 1, ptr %c, align 1
store i8 0, ptr %d, align 1