[Issue 6551] struct constructor not recognized when forward referenced
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 1 04:30:56 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6551
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at 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 <clugdbug at 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: -------
More information about the Digitalmars-d-bugs
mailing list