[Issue 21403] [ICE] dmd/backend/cgcs.d:375: Assertion `0' failed.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 23 07:21:16 UTC 2021


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
A no-template version:

 int[] mul11ret3(ref int[] s) {
    s ~= 11;
    return [3];
 }

 int[] test(int[] val) {
    (val ~= mul11ret3(val)) ~= 7;
    return val;
 }

 void main() {
    static assert(test([2]) == [2, 11, 3, 7]);
    assert(test([2]) == [2, 11, 3, 7]);
 }

--


More information about the Digitalmars-d-bugs mailing list