Bug 17866 – Appender.put is not @safe

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2017-09-30T16:29:26Z
Last change time
2020-03-21T03:56:33Z
Assigned to
No Owner
Creator
alex.jercaianu

Comments

Comment #0 by alex.jercaianu — 2017-09-30T16:29:26Z
Comment #1 by b2.temp — 2017-11-15T19:05:02Z
"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.