[Issue 1281] New: Cannot make invariant(blah)[] members in classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 19 11:29:46 PDT 2007


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

           Summary: Cannot make invariant(blah)[] members in classes
           Product: D
           Version: 2.000
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jarrett.billingsley at gmail.com


It's a parsing bug.

class A
{
        invariant(dchar)[] mData;
}

Gives the error "foo.d(7): Declaration expected, not '('"

However, aliasing this type and making the member that alias works:

alias invariant(dchar) idchar;
class A
{
        idchar[] mData; 
}


-- 



More information about the Digitalmars-d-bugs mailing list