digitalmars.D.bugs - [Issue 20608] New: [REG2.087] Cannot pass tuple.expand to auto ref
- d-bugmail puremagic.com (27/27) Feb 25 2020 https://issues.dlang.org/show_bug.cgi?id=20608
https://issues.dlang.org/show_bug.cgi?id=20608 Issue ID: 20608 Summary: [REG2.087] Cannot pass tuple.expand to auto ref T... template argument pack Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: johanengelen weka.io Testcase: ``` void foo(T...)(auto ref T args) {} void main() { import std.typecons; enum tup = tuple(1,"jojo"); foo(tup.expand); // line 6 } ``` This errors with DMD >= 2.087 with: onlineapp.d(6): Error: cannot modify constant expression `Tuple(1, "jojo").__expand_field_0` --
Feb 25 2020