[Issue 17477] DMD error message for delegate with wrong attributes is very confusing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 11 11:56:18 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=17477
Eyal <eyal at weka.io> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |---
--- Comment #2 from Eyal <eyal at weka.io> ---
It is true that this *specific* example now compiles, but if you extract g() to
the global scope it shows the problem again:
void f(void delegate(int) nothrow dlg) {}
void g(int x) {}
void main() {
f((x){ g(x); });
}
Error: function `testfuncliteral.f(void delegate(int) nothrow dlg)` is not
callable using argument types `(void)`
cannot pass argument `__lambda1` of type `void` to parameter `void
delegate(int) nothrow dlg`
--
More information about the Digitalmars-d-bugs
mailing list