[Issue 2828] New: Typedef'ed template struct incorrectly recognized as an inner struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 10 00:11:10 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2828

           Summary: Typedef'ed template struct incorrectly recognized as an
                    inner struct
           Product: D
           Version: 2.027
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ludwig at informatik.uni-luebeck.de


The following code fragment errors out with

---
bug_innerstruct.d(3): Error: struct bug_innerstruct.Test inner struct MyVariant
cannot be a field
---

Changing typedef to alias makes the code compile again.

---
struct Variant(T...) { T members; }
typedef Variant!(int, float) MyVariant;
struct Test { MyVariant v; }
---


-- 



More information about the Digitalmars-d-bugs mailing list