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


bearophile_h...@eml.cc changed:

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


--- Comment #2 from bearophile_h...@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: -------

Reply via email to