@safe function causes attribute inference since 2.072

Steven Schveighoffer schveiguy at gmail.com
Wed Apr 15 13:44:48 UTC 2020


On 4/14/20 10:07 PM, Walter Bright wrote:

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

I'm 100% on board with that. The only problem is unittests. When I 
define a type inside unittests to test that things do or do not compile 
with no-attributed functions, it's hard to make this work. And there are 
likely a lot of unittests out there that expect no attributes to be 
significant.

Could there be a way to specify the inference should be turned off? 
Perhaps just for unittests?

-Steve


More information about the Digitalmars-d mailing list