https://issues.dlang.org/show_bug.cgi?id=11304
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Kenji Hara <[email protected]> --- (In reply to Denis Shelomovskij from comment #0) > void f() @system {} > > @trusted { > void f1() @safe > { static assert(!__traits(compiles, f())); } // assert fails > } >From 2.066, f1 is marked as @safe, then the assert failure is fixed. > // It would be also good to reject g1/g2: > @safe void g1() @trusted { f(); } // compiled as @trusted > @trusted void g2() @safe { f(); } // compiled as @trusted >From 2.066, those fails to compile with "conflicting storage class" error. --
