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

           Summary: Error on using property as new dynamic array size
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2013-04-05 
17:16:11 MSD ---
---
struct S
{
    @property size_t p(T)()
    { return 0; }
}

@property size_t p(T)()
{ return 0; }

void main()
{
    S s;
    auto n1 = p!int; // OK
    auto n2 = s.p!int; // OK
    auto a1 = new int[p!int]; // Error: need size of rightmost array, not type
p!(int)
    auto a2 = new int[s.p!int]; // Error: no property 'p!(int)' for type 'S'
}
---

Workaround:
Put property in parantheses: `new int[(p!int)]`.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to