[Issue 18500] New: Be able to overwrite object.Object.toString with inout
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 23 00:59:31 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18500
Issue ID: 18500
Summary: Be able to overwrite object.Object.toString with inout
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
cat << EOF | dmd -c -o- -run -
void main()
{
class F
{
override string toString() inout @safe
{
return "Foo";
}
}
}
EOF
I'm aware that the current overloading rules don't really take `inout` into
account, but defining all three overloads is really annoying.
See also: https://issues.dlang.org/show_bug.cgi?id=9772 (removing toString from
Object)
--
More information about the Digitalmars-d-bugs
mailing list