Files
c3c/test/test_suite/generic/generic_with_enum.c3t
2025-12-29 17:01:03 +01:00

37 lines
471 B
Plaintext

// #target: macos-x64
module test{FOO};
const Z = FOO;
struct Foo
{
$typeof(FOO) z;
}
module tester;
import test;
enum Abc
{
ONE,
TWO
}
fn void main()
{
Foo{Abc.ONE} x;
Abc e = test::Z{Abc.ONE};
}
/* #expect: tester.ll
%"Foo{tester.Abc:ONE}" = type { i32 }
define void @tester.main() #0 {
entry:
%x = alloca %"Foo{tester.Abc:ONE}", align 4
%e = alloca i32, align 4
store i32 0, ptr %x, align 4
store i32 0, ptr %e, align 4
ret void
}