mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Disallow complist as a regular macro parameter.
This commit is contained in:
11
test/test_suite/initializer_lists/initializers_to_macros.c3
Normal file
11
test/test_suite/initializer_lists/initializers_to_macros.c3
Normal 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.
|
||||
}
|
||||
Reference in New Issue
Block a user