[Issue 21258] Tuple parameters with defaults use the first tuple element for all defaults since 2.094.0-beta.1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 17 10:41:23 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21258

--- Comment #1 from Richard Manthorpe <rmanth at gmail.com> ---
It's even more fun if you try it with different types:

alias AliasSeq(TList...) = TList;

auto foo(AliasSeq!(int, string) args = AliasSeq!(3, "hello"))
{
    return args[0] * args[1].length;
}

static assert(foo() == 15); // Error: cannot implicitly convert expression 3 of
type int to string

--


More information about the Digitalmars-d-bugs mailing list