Files
c3c/test/test_suite/errors/rethrow_macro.c3

14 lines
280 B
C

module testing;
import std::io;
macro char[] read(src, Allocator* allocator, n)
{
char* data = allocator.alloc_checked(n)!; // #error: Rethrow is only allowed in macros
io::read_all(src, data[:n])!;
}
fn void main()
{
ByteReader br;
read(&br, mem::temp(), 10);
}