dmd/compiler/test/compilable/vararg.d
Geod24 b8f003454c Add a missing test for typesafe variadic
While refactoring typesafe variadics, I noticed one 'if'
statement was not covered (but was by Buildkite),
so adding it to the testsuite.
The code in question is in compiler/src/dmd/mtype.d,
L4863 - L4867 ('prefer matching the element type rather than the array').
2022-09-06 15:05:45 +09:00

20 lines
391 B
D

void main ()
{
variance([1.0, 2, 3]);
}
alias meanType(T) = T;
template variance(bool stable = true)
{
void variance(Range)(Range r, bool isPopulation = false)
{
.variance!(double, stable)(r, isPopulation);
}
}
template variance(F, bool stable = true)
{
void variance(Range)(Range r, bool isPopulation = false) {}
void variance(scope const F[] ar...) {}
}