go/types: report types for mismatched call and return statements
This is a port of CL 364874 from types2 to go/types with various
adjustments:
- the error position for "not enough arguments" in calls is the
closing ) rather than the position of the last provided argument
- the ERROR comments in tests are positioned accordingly
- the reg. expression for matching error strings accepts newlines
for the . pattern (added s flag)
For #48834.
For #48835.
Change-Id: I64362ecf605bcf9d89b8dc121432e0131bd5da1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/367196
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>