mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
20 lines
282 B
Plaintext
20 lines
282 B
Plaintext
import std;
|
|
|
|
def IList = List{int};
|
|
fn IList IList.newAbc(&self)
|
|
{
|
|
IList l;
|
|
l.init(mem, $vasplat); // #error: can only be used inside
|
|
return l;
|
|
}
|
|
|
|
|
|
fn void main()
|
|
{
|
|
IList x;
|
|
IList a = x.newAbc(123, 123, 123, 123, 123, 123, 123, 134);
|
|
a.push(567);
|
|
|
|
io::printfn("%s", a[0]);
|
|
}
|