Bug 11924 – inout Variadic Template Parameters

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-14T09:03:00Z
Last change time
2014-01-22T18:19:07Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
blah38621

Comments

Comment #0 by blah38621 — 2014-01-14T09:03:49Z
In the previous version of DMD I was using, a snapshot from right around the release of 2.064, this compiles fine, however, in the git head, this fails to compile with `menuItem_1.itemTitle only parameters or stack based variables can be inout` (This is the reduced version produced by dustmite) inout(StringType) localize(StringType)(inout StringType str, string locale) { return str; } struct __slim_Root { static menuItem_1(ARGS...)() { enum itemTitle = ARGS; } static content_left_1() { menuItem!(localize("Home", "")); } alias menuItem = menuItem_1; } Also, while I did just realize I have a small bug in my code (I'm forcing localize to be evaluated at compile time, while I meant for it to be done at runtime), this code should still compile.
Comment #1 by k.hara.pg — 2014-01-14T18:10:06Z
Comment #2 by github-bugzilla — 2014-01-15T20:41:48Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/94d516e444d3c36030ea9aa63635528ac51475ee fix Issue 11924 - inout Variadic Template Parameters https://github.com/D-Programming-Language/dmd/commit/3b37a573bf46a3463e8de41008ee4c9d81e75974 Merge pull request #3097 from 9rnsr/fix11924 [REG2.065a] Issue 11924 - inout Variadic Template Parameters
Comment #3 by github-bugzilla — 2014-01-22T18:19:07Z
Commit pushed to release at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e62b283058aa99187b910e103976e3d0a02117b6 Merge pull request #3097 from 9rnsr/fix11924 [REG2.065a] Issue 11924 - inout Variadic Template Parameters