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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au
            Version|unspecified                 |D2
            Summary|[CTFE] struct constructor   |struct constructor not
                   |not recognized under weird  |recognized when forward
                   |conditions                  |referenced


--- Comment #1 from Don <clugd...@yahoo.com.au> 2011-09-01 04:30:48 PDT ---
This isn't a CTFE bug. Reduced test case:

uint NINE = 9;
typeof(F(NINE)) fails;

struct F
{
    ubyte th;
    this(uint x)
    { th = cast(ubyte) x; }
}

This is a forward reference issue. It compiles if you move the declaration of
'fails' past the declaration of F.

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

Reply via email to