Bug 19728 – AliasSeq in UDA errors

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-03-10T16:04:40Z
Last change time
2020-05-24T23:49:13Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Sebastiaan Koppe

Comments

Comment #0 by mail — 2019-03-10T16:04:40Z
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