[Issue 11497] lambda in "static if"/"assert" prevent inlining of function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 12 09:20:27 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11497



--- Comment #4 from monarchdodra at gmail.com 2013-11-12 09:20:26 PST ---
(In reply to comment #3)
> Hum... I did some more investigating, and it would appear the culprit is not
> "just" having a lambda, but rather, having a lambda that needs access to
> context. EG:
> 
> static assert(is(typeof(*chunk = arg))); //FAST
> static assert(is(typeof({*chunk = Arg.init;))); //FAST
> static assert(is(typeof({*chunk = arg;}))); //SLOW

Typo:
static assert(is(typeof(*chunk = arg))); //FAST
static assert(is(typeof({*chunk = Arg.init;}))); //FAST
static assert(is(typeof({*chunk = arg;}))); //SLOW

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list