mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Splatting const slices would not be const. #2185
This commit is contained in:
10
test/test_suite/functions/splat_error.c3
Normal file
10
test/test_suite/functions/splat_error.c3
Normal file
@@ -0,0 +1,10 @@
|
||||
import std;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
int[] $nums = { 0, 1, 2 };
|
||||
var $list = { ...$nums, 3 };
|
||||
$foreach $n : $list :
|
||||
$echo $n;
|
||||
$endforeach
|
||||
}
|
||||
Reference in New Issue
Block a user