Skip to content
Merged
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
7 changes: 3 additions & 4 deletions src/dmd/mtype.d
Original file line number Diff line number Diff line change
Expand Up @@ -4790,10 +4790,9 @@ extern (C++) final class TypeFunction : TypeNext
OutBuffer buf;
// only mention rvalue if it's relevant
const rv = !arg.isLvalue() && par.storageClass & (STC.ref_ | STC.out_);
const char* fmt = rv ?
"cannot pass rvalue argument `%s` of type `%s` to parameter `%s`" :
"cannot pass argument `%s` of type `%s` to parameter `%s`";
buf.printf(fmt, arg.toChars(), at, parameterToChars(par, this, qual));
buf.printf("cannot pass %sargument `%s` of type `%s` to parameter `%s`",
rv ? "rvalue ".ptr : "".ptr, arg.toChars(), at,
parameterToChars(par, this, qual));
return buf.extractString();
}

Expand Down