delegates/lambas do not pick up calling convention
Timon Gehr via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Aug 10 05:08:13 PDT 2017
On 10.08.2017 01:52, Johnson Jones wrote:
> given somethign like Threads.threadsAddIdle
>
> which takes an extern(C) int (void*)
>
> we can't seem to do
>
> threadsAddIdle((void*) { }, null);
I think this is a compiler bug. Try:
threadsAddIdle((x){ }, null);
It seems that the calling convention is deduced only if the parameter
type needs to be deduced too.
https://issues.dlang.org/show_bug.cgi?id=17739
More information about the Digitalmars-d-learn
mailing list