On 1/12/21 10:44 AM, Jonathan Levi wrote:

> why does `fun` still compile?

I'm not familiar with that particular syntax, I don't know why it compiles, and I don't know why structs are different. :) However, it looks very much like the following *slice* syntax:

void fun(S[] s...) {
    writeln(s);
}

In that case, the function receives a slice (to an array on the stack; so, do not keep a reference to it). Is that what you want?

Ali

Reply via email to