@@ -328,7 +328,6 @@ void funcDeclarationSemantic(Scope* sc, FuncDeclaration funcdecl)
328328 * static auto boo() {} // typed as impure
329329 * // Even though, boo cannot call any impure functions.
330330 * // See also Expression::checkPurity().
331- * }
332331 */
333332 if (tf.purity == PURE .impure && (funcdecl.isNested() || funcdecl.isThis()))
334333 {
@@ -1720,19 +1719,19 @@ FuncDeclaration resolveFuncCall(Loc loc, Scope* sc, Dsymbol s,
17201719 {
17211720 // Special case for immutable constructor with mutable arguments
17221721 // This directly addresses issue #20075
1723- .error(loc, " none of the overloads of `%s` are callable using argument types `(%s)`" ,
1722+ .error(loc, " none of the overloads of `%s` can construct an immutable object with argument types `(%s)`" ,
17241723 fd.toChars(), buf.peekChars());
17251724
17261725 // The compiler will print the available candidates later
17271726 }
17281727 else
17291728 {
1730- .error(loc, " none of the overloads of `%s` are callable using argument types `(%s)`" ,
1731- fd.toChars(), buf.peekChars());
1729+ .error(loc, " none of the overloads of `%s` can construct a %s object with argument types `(%s)`" ,
1730+ fd.toChars(), thisBuf.peekChars(), buf.peekChars());
17321731 }
17331732 }
17341733 else
1735- .error(loc, " none of the overloads of `%s` are callable using a %sobject with argument types `(%s)`" ,
1734+ .error(loc, " none of the overloads of `%s` are callable using a %s object with argument types `(%s)`" ,
17361735 fd.toChars(), thisBuf.peekChars(), buf.peekChars());
17371736
17381737 if (! global.gag || global.params.v.showGaggedErrors)
@@ -1762,10 +1761,10 @@ FuncDeclaration resolveFuncCall(Loc loc, Scope* sc, Dsymbol s,
17621761 return null ;
17631762
17641763 if (fd.isCtorDeclaration())
1765- .error(loc, " %s%s `%s` cannot construct a %sobject " ,
1764+ .error(loc, " %s%s `%s` cannot construct a %s object " ,
17661765 funcBuf.peekChars(), fd.kind(), fd.toPrettyChars(), thisBuf.peekChars());
17671766 else
1768- .error(loc, " %smethod `%s` is not callable using a %sobject " ,
1767+ .error(loc, " %smethod `%s` is not callable using a %s object " ,
17691768 funcBuf.peekChars(), fd.toPrettyChars(), thisBuf.peekChars());
17701769
17711770 if (mismatches.isNotShared)
@@ -2246,7 +2245,7 @@ FuncDeclaration overloadModMatch(FuncDeclaration thisfd, Loc loc, Type tthis, re
22462245 OutBuffer thisBuf, funcBuf;
22472246 MODMatchToBuffer(&thisBuf, tthis.mod, tf.mod);
22482247 MODMatchToBuffer(&funcBuf, tf.mod, tthis.mod);
2249- .error(loc, " %smethod %s is not callable using a %sobject " , thisfd.kind, thisfd.toPrettyChars,
2248+ .error(loc, " %smethod %s is not callable using a %s object " , thisfd.kind, thisfd.toPrettyChars,
22502249 funcBuf.peekChars(), thisfd.toPrettyChars(), thisBuf.peekChars());
22512250 }
22522251 }
0 commit comments