Files
c3c/test/test_suite/enumerations/const_enum_inline.c3t
Christoffer Lerno d71aa10f62 - Const inline enums would not always implicitly get converted to the underlying type.
- Update to dstring.append_string to take any type converting to String.
2026-02-05 13:04:57 +01:00

22 lines
352 B
Plaintext

// #target: macos-x64
module test;
enum Foo : const 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