DMD 1.032 and 2.016 releases

Sean Kelly sean at invisibleduck.org
Wed Jul 9 09:45:08 PDT 2008


== Quote from Don (nospam at nospam.com.au)'s article
> Lars Ivar Igesund wrote:
> >
> > There is another one triggered by the Tango unittests:
> >
> > tango/core/Variant.d(361): Error: functions cannot return static array
> > char[3u]
> >
> > I'm not able to minimize it out of the box though. Maybe this is a result of
> > the compiler becoming stricter, but it is any case a breaking change.
> Not necessarily. It might have uncovered a pre-existing bug. (Any
> accepts-invalid bug is very likely to break broken code).

While it's invalid to return a static array from a function, it does seem like
this could have undesired consequences:

    T fn(T)( T val ) { return val; }

Shouldn't the above be valid for all types?


Sean


More information about the Digitalmars-d-announce mailing list