https://issues.dlang.org/show_bug.cgi?id=16037
anonymous4 <dfj1es...@sneakemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|safe |performance Summary|Closure allocation despite |assigning delegate to a |scope variable for ternary |scope variable shouldn't |operator / CondExp |allocate closure Severity|major |enhancement --- Comment #2 from anonymous4 <dfj1es...@sneakemail.com> --- I've run into this myself :) Simpler example: --- void f() //@nogc { int a; void g(){ a=1; } scope h=&g; h(); } --- This shouldn't allocate closure because the delegate is assigned to a scope variable. --