Files
c3c/test/test_suite/generic/generic_void.c3t
Christoffer Lerno 8b49e6c14d Rename def to alias.
2025-03-13 11:22:27 +01:00

29 lines
436 B
Plaintext

// #target: macos-x64
module test{Type};
alias Callback = fn Type();
module mymain;
import std::io;
import test;
alias VoidCb = test::Callback{void};
fn int main()
{
VoidCb a = null;
void *b = a;
return 0;
}
/* #expect: mymain.ll
define i32 @main() #0 {
entry:
%a = alloca ptr, align 8
%b = alloca ptr, align 8
store ptr null, ptr %a, align 8
%0 = load ptr, ptr %a, align 8
store ptr %0, ptr %b, align 8
ret i32 0
}