Files
c3c/test/test_suite/compile_time_introspection/defined_inits.c3t

24 lines
369 B
Plaintext

// #target: macos-x64
module test;
struct Test
{
int a;
String b;
}
fn int main()
{
bool a = $defined(Test a = {"hello"});
bool b = $defined((Test){"hello"});
return 0;
}
/* #expect: test.ll
define i32 @main() #0 {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
store i8 0, ptr %a, align 1
store i8 0, ptr %b, align 1
ret i32 0
}