mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
19 lines
293 B
Plaintext
19 lines
293 B
Plaintext
import std;
|
|
|
|
def IList = List(<int>);
|
|
fn IList IList.new() @operator(construct)
|
|
{
|
|
IList l;
|
|
l.new_init($vasplat); // #error: can only be used inside
|
|
return l;
|
|
}
|
|
|
|
|
|
fn void main()
|
|
{
|
|
IList a = IList.new(123, 123, 123, 123, 123, 123, 123, 134);
|
|
a.push(567);
|
|
|
|
io::printfn("%s", a[0]);
|
|
}
|