@safe, pure and nothrow at the beginning of a module

Philippe Sigaud via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 15 11:17:46 PDT 2014


In another module I marked as '@safe:' at the top, the compiler told
me that a class opEquals could not be @safe (because Object.opEquals
is @system).

So it seems that indeed a module-level '@safe:' affects everything,
since a class method was found lacking.

(I put a @trusted attribute on it).


More information about the Digitalmars-d-learn mailing list