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

23 lines
336 B
Plaintext

// #target: macos-x64
module test;
import std;
const enum Color : char[<4>]
{
LIGHTGRAY = { 200, 200, 200, 255 },
}
fn int main()
{
Color c = LIGHTGRAY;
return 0;
}
/* #expect: test.ll
define i32 @main() #0 {
entry:
%c = alloca <4 x i8>, align 4
store <4 x i8> <i8 -56, i8 -56, i8 -56, i8 -1>, ptr %c, align 4
ret i32 0
}