October 15, 2012
On Monday, 15 October 2012 at 17:05:30 UTC, Simen Kjaeraas wrote:
> On 2012-35-15 17:10, Namespace <rswhite4@googlemail.com> wrote:
>
>> But bar([1, 2, 3]); not. The compiler does not realize that [1, 2, 3] means a static array in this context.
>> You have to write bar(cast(int[3]) [1, 2, 3]); but I think the compiler have to recognize this on it's own.
>
> This is true. The problem is, as you say, that the compiler treats array
> literals as dynamic rather than static arrays. I would argue this is the
> correct default, but it's obviously not the default you want here.
>
> bearophile has posted about this on numerous occasions, and it's among
> his top thousand wanted features. :p

I think this is a bug in IFTE.
Please file it into bugzilla.

Kenji Hara
1 2
Next ›   Last »