void f() pure nothrow @nogc { static void localFunc() { } localFunc(); } Complains because localFunc is not @nogc or nothrow. Doesn't complain about pure though. My feeling is that the attributes should apply to everything in the scope that they attribute?
See Issue 13550
Tested with DMD 2.082.0. Example code compiles without error.