On Borrow Checking

Paolo Invernizzi paolo.invernizzi at gmail.com
Mon May 12 09:38:45 UTC 2025


On Monday, 12 May 2025 at 09:24:13 UTC, Manu wrote:
> On Mon, 12 May 2025 at 03:55, Walter Bright via Digitalmars-d < 
> digitalmars-d at puremagic.com> wrote:
>
>> On 5/10/2025 9:07 PM, Manu wrote:
>> > 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...
>>
>>
>> I just tried it again, with the same result.
>>
>
> __gshared int* g;
> void test(scope int* x)
> {
>     g = x;
> }
>
> I just compiled this with -dip1000, and it compiles... This 
> looks like an escape to me! What have I misunderstood here?

Have you @safe: on the top?


More information about the Digitalmars-d mailing list