[Issue 14359] DMD does not compile SDC test0154.d

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Mar 28 21:56:15 PDT 2015


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

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
How SDC works for following codes?

auto foo(T u, T)() {
   return typeof(u).stringof;
}

pragma(msg, foo(1));         // T is deduced to int ... it's reasonable.

pragma(msg, foo(1, int));    // typeof(1) is int by default, so it might be
accepted

pragma(msg, foo(1, long));   // typeof(u) will be long, or conflict happens?
pragma(msg, foo(1, double)); // typeof(u) will be double, or conflict happens?

pragma(msg, foo(1, string)); // definitely conflicts

--


More information about the Digitalmars-d-bugs mailing list