Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/object.d
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ class Throwable : Object
override string toString()
{
string s;
toString((buf) { s ~= buf; });
toString((scope const buf) { s ~= buf; });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the compiler be able to infer the scope const here?

return s;
}

Expand All @@ -1907,7 +1907,7 @@ class Throwable : Object
* performed in certain error situations. Override this $(D
* toString) method to customize the error message.
*/
void toString(scope void delegate(in char[]) sink) const
void toString(scope void delegate(scope const char[]) sink) const
{
import core.internal.string : unsignedToTempString;

Expand Down