dmd/compiler/test/runnable/test19891.d
2022-07-09 18:53:07 +02:00

13 lines
153 B
D

int g;
void fun(R)(auto ref int a, auto ref R r = g, auto ref int b = 1)
{
++r;
}
void main()
{
fun(10, 2);
fun(10);
assert(g == 1);
}