- Compiler crash using ?? with a void? macro #2973

This commit is contained in:
Christoffer Lerno
2026-02-23 23:28:32 +01:00
parent ec65c5761e
commit d2f046780d
3 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
module test;
faultdef MALFORMED_RESPONSE;
macro void? set_field(String[] tokens)
{
if (tokens.len < 2) return MALFORMED_RESPONSE~;
}
fn void main()
{
String[] tokens = { "a", "b" };
set_field(tokens) ?? (void)1;
}
/* #expect: test.ll
fefe