On Tuesday, 27 March 2018 at 23:23:38 UTC, ag0aep6g wrote:
DMD might accept that, but I don't think it works in a
meaningful way. How do you call the @system one?
Looks like the @safe one will always be called, even from
@system code:
----
import std.stdio;
void talk() @system { writeln("@system"); }
void talk() @safe { writeln("@safe"); }
void main() @system
{
talk(); /* Prints "@safe". */
}
----
you can call them with __traits(getOverloads, T, "name")[index];
you can overload on types attributes and linkage, but seems like
you can only merge overloads based on types.