www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Why File.rawRead is system?

reply Kagamin <spam here.lot> writes:
Can't find a reason why it's not inferred  safe (on linux). Any 
idea?
Feb 07
next sibling parent Basile B. <b2.temp gmx.com> writes:
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)
Feb 07
prev sibling parent Dukc <ajieskola gmail.com> writes:
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.
Feb 07