On 6/21/22 1:33 PM, H. S. Teoh wrote:
On Tue, Jun 21, 2022 at 01:29:47PM -0400, Steven Schveighoffer via 
Digitalmars-d-learn wrote:
```d
void foo(void delegate() @system dg) @safe {
    int *bar;
    @system void corrupt() { bar = cast(int *)0xdeadbeef;}
    dg = &corrupt;
    // can I call dg now?
}
```
[...]

Does the language allow you to declare a @system delegate inside @safe
code?

The code I wrote above compiles, even with dip1000. (note that I didn't actually call the delegate)

-Steve

Reply via email to