Disallow complist as a regular macro parameter.

This commit is contained in:
Christoffer Lerno
2022-07-18 01:22:29 +02:00
parent 6cf3c9f46b
commit 547d30eb1e
3 changed files with 31 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
macro test(foo)
{
$typeof(foo) x = foo;
}
fn void main()
{
test(int[] { 1, 2 });
test({ 1, 2 }); // #error: An untyped list can only be passed as a compile time parameter.
}