Issue 4221 - dmd should not allow overload between @safe/@trusted and @system
Summary: dmd should not allow overload between @safe/@trusted and @system
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords: safe
Depends on:
Blocks:
 
Reported: 2010-05-22 19:31 UTC by SHOO
Modified: 2016-06-07 06:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description SHOO 2010-05-22 19:31:22 UTC
I tried to apply @safe/@trusted/@system to Phobos.
See also http://lists.puremagic.com/pipermail/phobos/2010-May/000488.html
I found this issue there.

Document says "Functions are overloaded based on how well the arguments to a function can match up with the parameters."
But @safe functions can overload between @system functions, though @safe is unrelated to parameters.
It's enough to have only @safe function.
Comment 1 Walter Bright 2016-06-07 06:25:10 UTC
Although I wouldn't regard it as a good practice to overload @safe/@system, I don't see much of a reason to disallow it. Overloading @safe/@trusted does not seem to be any issue at all.