aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/call.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/call.go')
-rw-r--r--src/go/types/call.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/go/types/call.go b/src/go/types/call.go
index 51603170a6..3c7c3226f6 100644
--- a/src/go/types/call.go
+++ b/src/go/types/call.go
@@ -368,11 +368,10 @@ func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, targs []Type
if sig.params != nil {
params = sig.params.vars
}
- check.errorf(at, _WrongArgCount, "%s arguments in call to %s\n\thave %s\n\twant %s",
- qualifier, call.Fun,
- check.typesSummary(operandTypes(args), false),
- check.typesSummary(varTypes(params), sig.variadic),
- )
+ err := newErrorf(at, _WrongArgCount, "%s arguments in call to %s", qualifier, call.Fun)
+ err.errorf(token.NoPos, "have %s", check.typesSummary(operandTypes(args), false))
+ err.errorf(token.NoPos, "want %s", check.typesSummary(varTypes(params), sig.variadic))
+ check.report(err)
return
}