[Issue 20608] New: [REG2.087] Cannot pass tuple.expand to auto ref T... template argument pack
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 25 18:30:03 UTC 2020
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 at puremagic.com
Reporter: johanengelen at 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`
--
More information about the Digitalmars-d-bugs
mailing list