[Issue 14210] invalid merging of template instances

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 20 09:56:02 PST 2015


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

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
p.s. to make it even clearer:

===
void main () {
  test("000", (int a) => a+0);
  test("001", (int b=40) => b+2);
}
===

output:
:: 000
int function(int a) pure nothrow @nogc @safe
:: 001
int function(int a) pure nothrow @nogc @safe


===
void main () {
  test("001", (int b=40) => b+2);
  test("000", (int a) => a+0);
}
===

output:
:: 001
int function(int b = 40) pure nothrow @nogc @safe
:: 000
int function(int b = 40) pure nothrow @nogc @safe


now THIS is very, very bad, as it not only messes with default arg value, but
renaming the arg itself.

--


More information about the Digitalmars-d-bugs mailing list