Local functions infer attributes?

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 30 15:39:53 PDT 2014


On Tuesday, 30 September 2014 at 08:33:27 UTC, Trass3r wrote:
> On Sunday, 28 September 2014 at 02:56:57 UTC, deadalnix wrote:
>> Also, inferring everything is quite
>> expensive and we want D to compile fast.
>
> Doesn't the compiler have to do that anyway?
> I'd expect a proper compiler to check if my code is actually 
> what
> I claim it is. It's quite easy to mark something as e.g. nogc in
> the first version and later on add code with allocations.

It is for the function body, but most qualifier are transitive,
so depends on the inference on other function.


More information about the Digitalmars-d mailing list