[Issue 20786] do attribute inference for all nested functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 5 02:53:55 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20786
--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to Steven Schveighoffer from comment #2)
> Shouldn't that work though?
>
> This compiles just fine:
>
> void x(void function() foo) { foo(); }
>
> void bar() @nogc pure nothrow @safe {}
>
> void main()
> {
> x(&bar);
> }
>
> I guess a good counter case would be helpful here.
Argh, you are right. I messed up the patch, sorry! It seems dmd does attribute
inference for nested functions, except if the the function is the member of a
nested aggregate declaration.
--
More information about the Digitalmars-d-bugs
mailing list