xxxxxxxxxx
import ldc.attributes;
import ldc.dynamic_compile;
int foo(int a, int b, int c)
{
return a + b + c; // this will be optimized to 40 + c
}
void main() {
auto f = bind(&foo, 30, 10, placeholder);
int delegate(int) d = f.toDelegate();
compileDynamicCode();
assert(f(2) == 42);
assert(d(2) == 42);
import std.stdio;
writeln(d(2));
}