[Issue 17866] Appender.put is not @safe

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 15 19:05:02 UTC 2017


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

Basile B. <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp at gmx.com
         Resolution|---                         |INVALID

--- Comment #1 from Basile B. <b2.temp at gmx.com> ---
"put" safety in inferred so this issue can be trivially proven wrong:


void main() @safe
{
    import std.array : Appender;
    Appender!(ubyte[]) a;
    a.put([ubyte(0)]);
}

Reopen with a proper test case if any. In the meantime is assumed that you must
called "put" with the result of an unsafe function.

--


More information about the Digitalmars-d-bugs mailing list