[Issue 14807] unnecessary closure allocation for function literal in compile time test
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 17 13:41:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14807
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ag0aep6g at gmail.com
--- Comment #1 from ag0aep6g at gmail.com ---
Silly workaround: Pass the literal to another literal that takes a scope
delegate.
----
void foo(int a) @nogc
{
static if (__traits(compiles,
(scope void delegate()){}(
{ a = 2; }
)
))
{}
}
----
--
More information about the Digitalmars-d-bugs
mailing list