[Issue 6174] Initialize const fixed-size array in constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 24 17:19:34 PDT 2011


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


Trass3r <mrmocool at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |mrmocool at gmx.de
           Platform|x86                         |All
         OS/Version|Windows                     |All
           Severity|enhancement                 |normal


--- Comment #1 from Trass3r <mrmocool at gmx.de> 2011-08-24 17:19:30 PDT ---
This also happens without explicit slicing/indexing:

immutable float[3] foo;

static this()
{
    foo = [1,2,3];
}

In my actual code I need a function to initialize the array.
It uses exp and thus isn't CTFEable. Hence static this would be the only to
initialize this immutable.

-- 
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