Bug or not? "Functions cannot return a function"

Meta via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 16 18:11:49 PST 2016


On Thursday, 17 November 2016 at 01:27:45 UTC, Meta wrote:
> auto bug(alias f)()
> {
>     return cast(typeof(f))&f;
> }
>
> void fun() {}
>
> void main()
> {
> 	bug!fun(); //Error: functions cannot return a function
> }

Got a bit ahead of myself. Found this in DMD 2.072.0.


More information about the Digitalmars-d mailing list