[Issue 16037] Closure allocation despite scope variable for ternary operator / CondExp
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 18 03:54:45 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16037
--- Comment #1 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
workaround?
T assumeScoped(T)(scope T t){ return t; }
void testXXX () @nogc
{
Object o;
scope bool delegate (Object) alwaysFalse = (Object y) { return false; };
scope c1 = o !is null ? assumeScoped((Object y) { return o is y; }) :
alwaysFalse;
}
--
More information about the Digitalmars-d-bugs
mailing list