Files
c3c/test/test_suite/lambda/lambda_splat_macro2.c3t
2025-10-20 02:26:04 +02:00

31 lines
482 B
Plaintext

// #target: macos-x64
module test;
import std;
fn int main()
{
bool x = test1a()();
return 0;
}
macro test1a(bool $a = ...) => fn bool()
{
return test1b(...$a);
};
macro test1b(bool $a = ...) => $defined($a) ??? $a : false;
/* #expect: test.ll
entry:
%x = alloca i8, align 1
%0 = call i8 @"test.test1a$lambda1"()
store i8 %0, ptr %x, align 1
ret i32 0
}
; Function Attrs: nounwind uwtable
define internal zeroext i8 @"test.test1a$lambda1"() #0 {
entry:
ret i8 0
}