[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 29 01:49:41 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=9279

Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Static array return value   |[REG2.055/2.063] Static
                   |implicitly converted to     |array return value
                   |immutable dynamic array     |implicitly converted to
                   |                            |immutable dynamic array
           Severity|critical                    |regression

--- Comment #6 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Vladimir Panteleev from comment #2)
> And now it doesn't even need to be a template function.

I guess that makes it a regression.

This program (based on original bug report):

/////////////////// test1.d //////////////////
static assert(!is(typeof({
    char[2] b()() { char[2] ret; return ret; }
    string a() { return b(); }
})));
//////////////////////////////////////////////

compiles in 2.054 but not in 2.055, regression introduced in:
https://github.com/D-Programming-Language/dmd/pull/218

This program (based on comment 2):

//////////////////// test2.d ///////////////////
static assert(!is(typeof({
    char[12] getArr() { return "Hello World!"; }
    string getString() { return getArr(); }
})));
////////////////////////////////////////////////

compiles in 2.062 but not in 2.063, regression introduced in:
https://github.com/D-Programming-Language/dmd/pull/1519

--


More information about the Digitalmars-d-bugs mailing list