[Issue 15640] type inference in variadic array params not working for classes

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 2 07:10:15 PST 2016


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

--- Comment #2 from Marc Schütz <schuetzm at gmx.net> ---
(In reply to Marc Schütz from comment #1)
> Note also that the following works, too:
> 
>     class A { }
>     class B : A { }
>     class C : A { }
>     auto a = [new A(), new B()];
>     pragma(msg, typeof(a));  // A[]

... should have been:

    auto a = [new B(), new C()];

But the result is just the same.

--


More information about the Digitalmars-d-bugs mailing list