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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from [email protected] ---
(In reply to Yuriy from comment #0)

> char[10] getSomeString()
> {
>       char[10] result;
>       int i = 0;
>       for (char a = '0'; a <= '9'; ++a)
>       {
>               result[i++] = a;
>       }
>       return result;
> }

D is not fully memory-safe. A starting point to avoid such troubles is to
require a [] at that return point:

    }
    return result[];
}

--

Reply via email to