Comment #0 by stanislav.blinov — 2022-02-23T11:16:38Z
void foo(in int[3] a...) {}
void bar(scope const int[3] a...) {}
void car(in int[3] x) {}
void main()
{
// Both lines compile without -preview=in
foo(1, 2, 3); // this line fails with -preview=in (cannot pass rvalue argument `1` of type `int` to parameter `in int[3] a...`)
bar(1, 2, 3); // but this one compiles in both cases
car([1, 2, 3]); // so does this
}
Comment #1 by stanislav.blinov — 2022-02-23T11:17:20Z
Should be "the three lines", not "both lines".
Comment #2 by robert.schadek — 2024-12-13T19:21:11Z