Initializing a table of delegates with no-op stubs

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jan 10 23:15:39 UTC 2020


On Fri, Jan 10, 2020 at 05:59:53PM +0000, Arine via Digitalmars-d wrote:
> This works too:
> 
>     struct S {
>         void function(int) f1 = (int) { }; // OK
>     }
> 
> Which makes me think, it isn't allowing it because of the context
> pointer.  But if that context pointer is null, it should work. File a
> bug report and hope it gets fixed soon™?
[...]

https://issues.dlang.org/show_bug.cgi?id=20498


T

-- 
English is useful because it is a mess. Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. Similarly, Perl was designed to be a mess, though in the nicest of all possible ways. -- Larry Wall


More information about the Digitalmars-d mailing list