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
Delegate / Error: cannot implicitly convert expression...
Robert M. Münch via Digitalmars-d-learn Sat, 15 Jun 2019 08:56:07 -0700
Why does the follwing code give: Error: cannot implicitly convert
expression & myFunc of type void function(int a) to void delegate(int)
- Delegate / Error: cannot implicit... Robert M. Münch via Digitalmars-d-learn
- Re: Delegate / Error: cannot... Anonymouse via Digitalmars-d-learn
- Re: Delegate / Error: ca... Robert M. Münch via Digitalmars-d-learn
- Re: Delegate / Error... Alex via Digitalmars-d-learn
- Re: Delegate / Error... user1234 via Digitalmars-d-learn
- Re: Delegate / E... ag0aep6g via Digitalmars-d-learn
- Re: Delegat... user1234 via Digitalmars-d-learn
