diff --git a/src/dmd/mtype.d b/src/dmd/mtype.d index f5c51902ce9a..31a5498cf9c1 100644 --- a/src/dmd/mtype.d +++ b/src/dmd/mtype.d @@ -4782,6 +4782,8 @@ extern (C++) final class TypeFunction : TypeNext // arguments get specially formatted private const(char)* getParamError(const(char)* format, Expression arg, Parameter par) { + if (global.gag && !global.params.showGaggedErrors) + return null; // show qualification when toChars() is the same but types are different auto at = arg.type.toChars(); bool qual = !arg.type.equals(par.type) && strcmp(at, par.type.toChars()) == 0;