]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix type error reported on the wrong line
authorJason7602 <jansonzhe@gmail.com>
Tue, 9 Nov 2021 15:46:41 +0000 (23:46 +0800)
committerRobert Findley <rfindley@google.com>
Thu, 9 Dec 2021 18:03:49 +0000 (18:03 +0000)
commitece493eb831a7797d03d60b44b817caf1c63a0ab
tree0551320d18942d553252202e6d958936f2d2fe63
parent78b4518e31b39aac4fbad1679db95b3f526229a7
cmd/compile: fix type error reported on the wrong line

The 'Does not match' type error shoud be reported where
the function is called, not where the function is declared.

And fix the todo by gri of issue45985

Fixes #45985
Fixes #49800

Change-Id: I15aac44dd44f2a57c485a1c273fcd79db912c389
Reviewed-on: https://go-review.googlesource.com/c/go/+/362634
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue45985.go2
src/go/types/infer.go
src/go/types/testdata/fixedbugs/issue45985.go2