Why does the follwing code give: Error: cannot implicitly convert expression & myFunc of type void function(int a) to void delegate(int)

void myFunc(int a){return;}

void main()
{
   void delegate(int) dg;
   dg = &myFunc;
}

See: https://run.dlang.io/is/iTYo2L

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to