Understanding DIP 1000 semantics -- Where's the bug?
Sebastiaan Koppe
mail at skoppe.eu
Thu Sep 26 09:26:42 UTC 2019
On Thursday, 26 September 2019 at 05:36:39 UTC, Walter Bright
wrote:
> On 9/23/2019 1:46 AM, Olivier FAURE wrote:
>> The following code compiles with -dip1000.
>>
>> @safe:
>>
>> int* foo(ref int x)
>> {
>> int* a = &x;
>> return a;
>> }
>
> That's a bug. Not sure how I missed that. `a` should be
> inferred as `scope`.
That is interesting. Thanks for the clear up.
More information about the Digitalmars-d
mailing list