DIP 1012--Attributes--Preliminary Review Round 1

Nicholas Wilson via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 27 16:04:32 PDT 2017


On Thursday, 27 July 2017 at 14:58:22 UTC, Atila Neves wrote:
> "at the top of a file means that one can never "undo" those 
> attributes"
>
> That's not true for `@safe`. This is perfectly legal:
>
> @safe:
>
> void foo()  { ... }    // foo is @safe
> void bar() @system { } // bar is @system
>
>
> _Why_ it works like that I have no idea.
>
> Atila

Huh.  I guess it's because there are three values in that group, 
unlike the rest of them, and the compiler handles them 
differently.


More information about the Digitalmars-d mailing list