dip25 implementation
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 6 14:16:20 PDT 2015
On 8/6/15 4:24 PM, "Per =?UTF-8?B?Tm9yZGzDtnci?=
<per.nordlow at gmail.com>" wrote:
> On Tuesday, 4 August 2015 at 20:54:43 UTC, Steven Schveighoffer wrote:
>> How complete is the dip25 implementation?
>>
>> For example, should this be expected to be an error?
>>
>> struct S
>> {
>> int[5] x;
>> auto foo() { return x[];}
>> }
>
> You need to (at least) qualify `foo` as @safe.
According to 2.067.0 it was an error without annotating as @safe if you
use -dip25. I don't understand the "relaxing" of it in the latest
version, but maybe I'm missing something.
If x was a function local, you don't need to mark foo @safe to get an
error. I thought dip25 was supposed to make that the norm for all data
that it could prove was being improperly escaped.
-Steve
More information about the Digitalmars-d
mailing list