[Issue 12529] Function/delegate type alias picks up @safe attribute from surrounding scope

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 4 14:20:51 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12529

--- Comment #4 from Lars T. Kyllingstad <bugzilla at kyllingen.net> ---
I think it *is* a bug.  To me, the statement clearly says "make F an alias for
void function()".  Attributes should only apply to the declared symbol itself
(and an alias obviously cannot be @safe; only functions can).

Consider this:

    const:
    alias T = int;

Should T now be an alias for int or const(int)?  Currently, it is the former,
as I think it should be.

--


More information about the Digitalmars-d-bugs mailing list