https://issues.dlang.org/show_bug.cgi?id=21803
Eyal <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal --- Comment #1 from Eyal <[email protected]> --- A pure function incorrectly taints all delegates declared within it as pure as well. For example, this compiles: __gshared string global; struct S { auto f() { scope dlg = { throw new Exception(global); }; } static assert(hasFunctionAttributes!(f, "pure")); } But this complains about the use of the global: struct T { pure void f() { scope dlg = { throw new Exception(global); }; } } --
