Walter Bright <> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Walter Bright <> ---
Adding @safe to the lambda:

  void test() @safe
    int var;
    scope int* p;
    static int* escape;
    static assert(!__traits(compiles, () @safe { escape = p; }));
  //    escape = p;

and it compiles without error. The lambda does not inherit @safe from the
function. Perhaps it should, but that would be an enhancement request, and
would possibly break existing code. It should be the subject of a separate


Reply via email to