Skip to content

Commit

Permalink
Fix triggering CallExp error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel authored and wilzbach committed Jan 17, 2018
1 parent 6408f40 commit 24f52a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dmd/expressionsem.d
Expand Up @@ -3498,7 +3498,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
assert(exp.f);
tiargs = null;

if (ve.hasOverloads)
if (exp.f.overnext)
exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.arguments, 2);
else
{
Expand All @@ -3513,8 +3513,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
buf.writeByte(')');

//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "`%s%s` is not callable using argument types `%s`",
exp.e1.toChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString());
.error(exp.loc, "%s `%s%s` is not callable using argument types `%s`",
exp.f.kind(), exp.f.toPrettyChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString());
if (failMessage)
errorSupplemental(exp.loc, failMessage);
exp.f = null;
Expand Down

0 comments on commit 24f52a2

Please sign in to comment.