D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17866 - Appender.put is not @safe
Summary: Appender.put is not @safe
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Mac OS X
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-30 16:29 UTC by alex.jercaianu
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description alex.jercaianu 2017-09-30 16:29:26 UTC

    
Comment 1 basile-z 2017-11-15 19:05:02 UTC
"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.