https://issues.dlang.org/show_bug.cgi?id=19640

Radu Racariu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Radu Racariu <[email protected]> ---
As Razvan pointed out, that delegate will create a closure and allocate on the
GC heap.

This is fixable by changing `call` to look like

```
int call(scope int delegate() d)
```

Note the scope keyword.

Also, main should look like

```
extern(C) void main()
```

Please use the learn forums (https://forum.dlang.org/group/learn) before adding
a bug, this kind of information is easily available there.

--

Reply via email to