Bug 13252 – ParameterDefaultValueTuple affects other instantiations
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-04T08:36:00Z
Last change time
2014-08-22T08:05:15Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2014-08-04T08:36:56Z
/////////////////////////////////// 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