Are unittests that are marked @safe actually checked for safety?


https://github.com/dlang/phobos/blob/v2.093.1/std/file.d#L4937
How comes this unittest is @safe when `dirEntries` appears to be @system?


Example I:

https://run.dlang.io/is/Vf0STw
Error: @safe function onlineapp.listdir cannot call @system function std.file.dirEntries


Example II (by adr):

int* a = cast(int*) 0xdeadbeef;
also was allowed..
making me think @safe unittest doesn't actually check the safety


 - Elias




PS: is there a @safe version of `dirEntries`?

Reply via email to