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
Comment #1 by k.hara.pg — 2014-08-05T13:58:55Z
Comment #2 by github-bugzilla — 2014-08-05T17:22:31Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ab0d53035222c14c43fecdeb870281e8066a63f7 fix Issue 13252 - ParameterDefaultValueTuple affects other instantiations Expression::equals should also compare operand types. https://github.com/D-Programming-Language/dmd/commit/895c56c6e1777e7958b133c0bfe414b7caa78ab9 Merge pull request #3846 from 9rnsr/fix13252 [REG2.061] Issue 13252 - ParameterDefaultValueTuple affects other instantiations
Comment #3 by github-bugzilla — 2014-08-08T02:59:20Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c6db060de2c1aba316bd92c2dcb44801deafd7f Merge pull request #3846 from 9rnsr/fix13252 [REG2.061] Issue 13252 - ParameterDefaultValueTuple affects other instantiations
Comment #4 by github-bugzilla — 2014-08-22T08:05:15Z