Open
Description
import std.stdio;
@safe void main()
{
stderr.writeln("Hello");
}
Fails with:
test.d(4): Error: `@safe` function `D main` cannot call `@system` function `std.stdio.makeGlobal!"core.stdc.stdio.stderr".makeGlobal`
stderr.writeln("Hello");
^
/path/to/dmd.linux.nixified/dmd2/linux/bin64/../../src/phobos/std/stdio.d(#): and using `__gshared` instead of `shared` makes it fail to infer `@safe`
__gshared File.Impl impl;
^
/path/to/dmd.linux.nixified/dmd2/linux/bin64/../../src/phobos/std/stdio.d(#): `std.stdio.makeGlobal!"core.stdc.stdio.stderr".makeGlobal` is declared here
@property ref File makeGlobal(StdFileHandle _iob)()
^
Metadata
Metadata
Assignees
Labels
No labels