@safe function causes attribute inference since 2.072

Walter Bright newshound2 at digitalmars.com
Wed Apr 15 02:07:10 UTC 2020


On 4/14/2020 2:08 PM, Steven Schveighoffer wrote:
> Is there any reason why @safe functions are also affected? Is there any reason 
> we shouldn't extend this to other attributed functions, or just all things 
> inside a function context?

I think the rationale was that @system-by-default didn't make sense for nested 
functions inside @safe functions when source was available. So being in @safe 
turned on attribute inference for them.

It probably does make sense to turn on attribute inference for everything 
defined within a function.



More information about the Digitalmars-d mailing list