digitalmars.D.bugs - [Issue 20093] New: Error: cannot form tuple of tuples
- d-bugmail puremagic.com (31/31) Jul 31 2019 https://issues.dlang.org/show_bug.cgi?id=20093
https://issues.dlang.org/show_bug.cgi?id=20093 Issue ID: 20093 Summary: Error: cannot form tuple of tuples Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: destructionator gmail.com mixin template MakeProperty(Attributes...) { (Attributes) void bug() {} } struct Attr { } struct Test { mixin MakeProperty!(Attr); } void main() { pragma(msg, __traits(getAttributes, Test.bug).stringof); } ------ Interestingly, it compiles fine if you do not try to actually getAttributes; comment out that pragma line in main and it works just fine. It also works if you pass a value to MakeProperty; only a type like in the example triggers the problem. In dmd, the comment says "Assume exps[] is already tuple expanded." so I'm guessing some semantic() pass wasn't run in the right place for this. --
Jul 31 2019