www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13252] New: ParameterDefaultValueTuple affects other

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

          Issue ID: 13252
           Summary: ParameterDefaultValueTuple affects other
                    instantiations
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

/////////////////////////////////// test.d ///////////////////////////////////
import std.traits;

void f1(string[] = null) {}
void f2(string   = null) {}

static assert(is(typeof(ParameterDefaultValueTuple!f1[0]) == string[])); // OK
static assert(is(typeof(ParameterDefaultValueTuple!f2[0]) == string  )); // NG
//////////////////////////////////////////////////////////////////////////////

The second assert fails. If the first assert is commented out, the second
assert passes.

This worked in DMD 2.060 and no longer works since DMD 2.061.
Introduced in https://github.com/D-Programming-Language/dmd/pull/1368

--
Aug 04 2014