DIP1000 scope inference

rikki cattermole rikki at cattermole.co.nz
Tue Oct 25 02:19:43 UTC 2022


On 25/10/2022 3:13 PM, rikki cattermole wrote:
> On 25/10/2022 3:09 PM, Paul Backus wrote:
>> For example, the `@trusted` function below is memory safe when using 
>> the current compiler release, but will become unsafe when compiled 
>> with DMD 2.101:
>>
>> ```d
>> @trusted int[] example()
>> {
>>      scope example = [1, 2, 3];
>>      return example;
>> }
>> ```
> 
> Does this also apply to @safe?

Apparently.

I can't find any checks in the PR.

REVERT REVERT REVERT (or ya know add the check for @safe).

#SuddenlyWorried lol


More information about the Digitalmars-d mailing list