[Issue 7664] Problem with fixed-sized associative array key assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 24 10:14:09 PDT 2012


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


--- Comment #2 from bearophile_hugs at eml.cc 2012-03-24 10:14:32 PDT ---
(In reply to comment #1)
> Compiler can calculate the length for s[0 .. 4] in compile time, because both
> lower bound and upper bound are constant expressions. So converting it to
> static array type is possible.
> 
> But, currently, the slice of an array expression is *always* typed as dynamic
> array type.
> Therefore it is a constant-folding enhancement, not a bug.

Thank you for your answers. I convert this to enhancement request then.

I think such constant-folding is useful to remove some run-time tests and speed
up other code that uses slices.

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