Bug 4221 – dmd should not allow overload between @safe/@trusted and @system

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-05-22T19:31:00Z
Last change time
2016-06-07T06:25:10Z
Keywords
safe
Assigned to
nobody
Creator
zan77137

Comments

Comment #0 by zan77137 — 2010-05-22T19:31:22Z
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 by bugzilla — 2016-06-07T06:25:10Z
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.