January 11, 2023 [Issue 23621] New: Implicitly convert function to delegate | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23621 Issue ID: 23621 Summary: Implicitly convert function to delegate Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody@puremagic.com Reporter: msnmancini@hotmail.com ```d import std.stdio; int add(int delegate() a, int delegate() b){return a()+b();} int getNumber(){return 50;} void main() { writeln(add(&getNumber, &getNumber)); } ``` This currently does not compile, so it is needed tu wrap -- |
Copyright © 1999-2021 by the D Language Foundation