}
err := check.newError(WrongArgCount)
err.addf(at, "%s arguments in call to %s", qualifier, call.Fun)
- err.addf(nopos, "have %s", check.typesSummary(operandTypes(args), false))
+ err.addf(nopos, "have %s", check.typesSummary(operandTypes(args), ddd))
err.addf(nopos, "want %s", check.typesSummary(varTypes(params), sig.variadic))
err.report()
return
}
err := check.newError(WrongArgCount)
err.addf(at, "%s arguments in call to %s", qualifier, call.Fun)
- err.addf(noposn, "have %s", check.typesSummary(operandTypes(args), false))
+ err.addf(noposn, "have %s", check.typesSummary(operandTypes(args), ddd))
err.addf(noposn, "want %s", check.typesSummary(varTypes(params), sig.variadic))
err.report()
return
--- /dev/null
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func _() {
+ var values []int
+ vf(values /* ERROR "(variable of type []int) as string value" */)
+ vf(values...) /* ERROR "have (...int)" */
+ vf("ab", "cd", values /* ERROR "have (string, string, ...int)" */ ...)
+}
+
+func vf(method string, values ...int) {
+}