override and @trusted

deadalnix deadalnix at gmail.com
Sun Mar 11 09:16:06 PDT 2012


As suggested, override will propagate function's qualifier of the 
superclass. What about the @trusted attribute ?

It seems to be quite dangerous attribute to propagate. And if we don't, 
we could ends up with strange stuffs dues to @safe inference in the 
subclasse.

I suggest override to propagate @safe in the case of @trusted function 
overload, except if overloaded function is explicitly tagged as @trusted .

@trusted isn't something that we want to propagate automatically.


More information about the Digitalmars-d mailing list