Comment #0 by andrej.mitrovich — 2020-04-14T07:16:37Z
-----
struct Amount
{
int value;
}
immutable Amount MinFreezeAmount = Amount(1);
void test (Amount delegate(Amount))
{
}
void main ()
{
test(amount => MinFreezeAmount);
}
-----
> test.d(14): Error: function test.test(Amount delegate(Amount) _param_0) is not callable using argument types (void)
> test.d(14): cannot pass argument __lambda1 of type void to parameter Amount delegate(Amount) _param_0
The diagnostic should be something like:
> test.d(14): Error: function test.test(Amount delegate(Amount) _param_0) is not callable using argument types (immutable(Amount) delegate(Amount))
Comment #1 by robert.schadek — 2024-12-13T19:08:06Z