Bug 13681 – @safe empty writeln

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-11-04T10:48:00Z
Last change time
2017-07-19T17:42:29Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-11-04T10:48:16Z
void main() @safe { import std.stdio: writeln; writeln; } dmd 2.067alpha gives: test.d(3,5): Error: safe function 'D main' cannot call system function 'std.stdio.writeln!().writeln' Note that this compiles: void main() @safe { import std.stdio: write; write('\n'); }
Comment #1 by github-bugzilla — 2015-03-10T21:15:04Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e601077b8618c595fa51807a85c54f8c4e32ca9a make 0-arg writeln @trusted: Fix Issue 13681 https://github.com/D-Programming-Language/phobos/commit/38453e82adfdcba8d5d817fd8404acf8edeb04f3 Merge pull request #3046 from John-Colvin/patch-13 make 0-arg writeln @trusted: Fix Issue 13681 take 2
Comment #2 by github-bugzilla — 2017-07-19T17:42:29Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/e601077b8618c595fa51807a85c54f8c4e32ca9a make 0-arg writeln @trusted: Fix Issue 13681 https://github.com/dlang/phobos/commit/38453e82adfdcba8d5d817fd8404acf8edeb04f3 Merge pull request #3046 from John-Colvin/patch-13