[Issue 20093] New: Error: cannot form tuple of tuples
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 31 22:53:06 UTC 2019
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 at puremagic.com
Reporter: destructionator at 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.
--
More information about the Digitalmars-d-bugs
mailing list