← Back to index
|
Original Bugzilla link
Bug 10375 – [REG2.061] private template from imported module hijacks a template type parameter(!)
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-16T04:34:00Z
Last change time
2013-06-24T00:19:07Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
dmitry.olsh
Comments
Comment #0
by dmitry.olsh — 2013-06-16T04:34:03Z
Example: import std.typetuple; void packIt(Pack)(Pack p){ } //3 void main() { packIt!(int)(2); //7 } Produces: bug_alias.d(3): Error: module bug_alias std.typetuple.Pack(T...) is private bug_alias.d(7): Error: template instance bug_alias.packIt!(int) error instantiating Used a recent dmd from github master HEAD. Related code from std.typetuple: private template Pack(T...) { alias T tuple; // For convenience template equals(U...) { static if (T.length == U.length) { static if (T.length == 0) enum equals = true; else enum equals = isSame!(T[0], U[0]) && Pack!(T[1 .. $]).equals!(U[1 .. $]); } else { enum equals = false; } } }
Comment #1
by k.hara.pg — 2013-06-16T20:33:59Z
https://github.com/D-Programming-Language/dmd/pull/2191
Comment #2
by k.hara.pg — 2013-06-16T20:56:41Z
*** Issue 10385 has been marked as a duplicate of this issue. ***
Comment #3
by github-bugzilla — 2013-06-24T00:14:01Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/c544a2c05dc5513d71d060b91a8f11d941ce8c2f
fix Issue 10375 - private template from imported module hijacks a template type parameter(!)
https://github.com/D-Programming-Language/dmd/commit/791fa018008c811dd13aa5e45e6a4b201042af22
Merge pull request #2191 from 9rnsr/fix10375 [REG2.061] Issue 10375 - private template from imported module hijacks a template type parameter(!)
Comment #4
by github-bugzilla — 2013-06-24T00:18:56Z
Commit pushed to 2.063 at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/46186a4551e2ce98423139de228cdad86eaea634
Merge pull request #2191 from 9rnsr/fix10375 [REG2.061] Issue 10375 - private template from imported module hijacks a template type parameter(!)