Summary: [SafeD] Exception/Throwable constructors are not @safe
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime

--- Comment #0 from Dmitry Olshansky <> 2011-09-12 
06:17:30 PDT ---
@safe class NewException : Exception
    this(string msg, string file = __FILE__, size_t line = __LINE__)
        super(msg, file, line);

Results in:
safe.d(7): Error: safe function 'this' cannot call system function 'this'

The funny thing is that Exception still can be created/thrown in @safe
functions, e.g. this compiles:

@safe void f()
    new Exception("blah");

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to