On Sun, 11 May 2025, 1:46 am Walter Bright via Digitalmars-d, <digitalmars-d@puremagic.com> wrote:
On 5/10/2025 5:10 AM, Manu wrote:
> Okay, so then why should `scope` need `@safe`?

It doesn't. It needs -dip1000, though.

```
int* foo(scope int* q) { return q; }
```
```
./cc -c x.d -dip1000
x.d(1): Error: scope parameter `q` may not be returned
int* foo(scope int* q) { return q; }
                                 ^
```

I tested that and it didn't work for me. Maybe my test was faulty somehow since I was working through numerous combinations, I'll try it again...