The following compiles, but not if I remove Dummy from the AliasSeq, or remove Dummy's assignment to 0.
The error I get is `Error: cannot form tuple of tuples`
---
import std.meta;
enum A; enum B; enum Dummy = 0; // <- Dummy needs to be 0
struct Param(alias T) {}
@AliasSeq!(Dummy,Param!A,Param!B) // <- Here Dummy is needed
struct Foo {}
pragma(msg, __traits(getAttributes, Foo));
void main() {}
---
Comment #1 by b2.temp — 2019-03-10T16:44:35Z
test case, w/o phobos
---
enum A; enum B; enum Dummy = 0; // <- Dummy needs to be 0
alias Seq(T...) = T;
@Seq!(A,B) struct Foo1 {} // rejected
@Seq!(A,B, Dummy) struct Foo2 {} // works because of dummy
static assert(is(typeof(__traits(getAttributes, Foo1)))); // fails but should not
static assert(is(typeof(__traits(getAttributes, Foo2)))); // pk
void main() {}
---
Comment #2 by boris2.9 — 2020-05-19T10:45:46Z
*** Issue 20093 has been marked as a duplicate of this issue. ***
Comment #3 by dlang-bot — 2020-05-19T11:23:50Z
@BorisCarvajal created dlang/dmd pull request #11160 "Fix Issues 19728, 20093 - AliasSeq in UDA errors" fixing this issue:
- Fix Issues 19728, 20093 - AliasSeq in UDA errors
https://github.com/dlang/dmd/pull/11160
Comment #4 by dlang-bot — 2020-05-24T23:49:13Z
dlang/dmd pull request #11160 "Fix Issues 19728, 20093 - AliasSeq in UDA errors" was merged into stable:
- 3ae76de5a11379fcd137106ffaf5caaa3325f698 by Boris Carvajal:
Fix Issues 19728, 20093 - AliasSeq in UDA errors
https://github.com/dlang/dmd/pull/11160