<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 11 May 2025, 1:46 am Walter Bright via Digitalmars-d, <<a href="mailto:digitalmars-d@puremagic.com" target="_blank" rel="noreferrer">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 5/10/2025 5:10 AM, Manu wrote:<br>
> Okay, so then why should `scope` need `@safe`?<br>
<br>
It doesn't. It needs -dip1000, though.<br>
<br>
```<br>
int* foo(scope int* q) { return q; }<br>
```<br>
```<br>
./cc -c x.d -dip1000<br>
x.d(1): Error: scope parameter `q` may not be returned<br>
int* foo(scope int* q) { return q; }<br>
                                 ^<br>
```<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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...</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>