aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2022-01-19 22:00:42 -0500
committerRobert Findley <rfindley@google.com>2022-01-20 14:59:17 +0000
commit9284279b44418b52221b4d68d400fa9220521726 (patch)
tree6fd41ac990e44aae2d0bcd79aaf315ee842827e5 /src/runtime/testdata
parente7d5857a5a82551b8a70b6174ec73422442250ce (diff)
downloadgo-9284279b44418b52221b4d68d400fa9220521726.tar.xz
go/types, types2: use Identical rather than unification in missingMethod
Now that we instantiate methods on instantiated types, there is no need to use unification to match signatures inside of missingMethod. Generally, we should never encounter uninstantiated signatures within statements. If we do encounter signatures that contain type parameters, it is because the signatures are themselves defined or instantiated using type parameters declared in the function scope (see example below). The current unification logic would not handle this. type S[T any] struct{} func (S[T]) m(T) func _[P any]() bool { var v interface{m(int)} _, ok = v.(S[P]) return ok } Change-Id: I754fb5535bba2fc7a209dc7419fd4015c413c9a6 Reviewed-on: https://go-review.googlesource.com/c/go/+/379540 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/testdata')
0 files changed, 0 insertions, 0 deletions