Thread overview
Why File.rawRead is @system?
Feb 07, 2017
Kagamin
Feb 07, 2017
Basile B.
Feb 07, 2017
Dukc
February 07, 2017
Can't find a reason why it's not inferred @safe (on linux). Any idea?
February 07, 2017
On Tuesday, 7 February 2017 at 09:21:18 UTC, Kagamin wrote:
> Can't find a reason why it's not inferred @safe (on linux). Any idea?

Uh ? It's safe

Just tried

----
import std.stdio;

void main(string[] args) @safe
{
    File f;
    ubyte[] z;
    z = f.rawRead(z);
}
----

And it compiles (DMD 2.073, Linux, X86_64)
February 07, 2017
On Tuesday, 7 February 2017 at 09:21:18 UTC, Kagamin wrote:
> Can't find a reason why it's not inferred @safe (on linux). Any idea?
Perhaps you are trying to read as a type for which a conversion from string to it is @system? Not sure if that's possible.