www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19728] New: AliasSeq in UDA errors

https://issues.dlang.org/show_bug.cgi?id=19728

          Issue ID: 19728
           Summary: AliasSeq in UDA errors
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mail skoppe.eu

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() {}

---

--
Mar 10 2019